bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Handling remote socket shutdown


From: Pavel Roskin
Subject: [PATCH] Handling remote socket shutdown
Date: Mon, 5 Mar 2001 23:55:47 -0500 (EST)

Hello!

The GNU CVS server at subversions.gnu.org doesn't work with GSSAPI
protocol - it closes the connection at some point. Worse yet, the CVS
client is not prepared to handle this error condition - it loops an
consumes all CPU time.

Fixing this problem at GNU is a separate issue, which will be reported to
the GNU cvs-hackers. This is just a patch for CVS to make it exit
gracefully when faced a closed connection during GSSAPI handshake.

ChangeLog:
        * client.c (recv_bytes): Exit with an error message if the
        server closes the connection.

_______________________
--- client.c
+++ client.c
@@ -4160,6 +4160,10 @@
        if (got < 0)
            error (1, 0, "recv() from server %s: %s", 
current_parsed_root->hostname,
                   SOCK_STRERROR (SOCK_ERRNO));
+       if (got == 0)
+           error (1, 0, "server %s has closed the connection",
+                  current_parsed_root->hostname,
+                  SOCK_STRERROR (SOCK_ERRNO));
        buf += got;
        need -= got;
     }
_______________________

Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]