]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - rlogin.c
Improve socket error handling so that a socket error isn't an
[PuTTY.git] / rlogin.c
index b3e9eac922cbf4029840e2e192bb5bd887603c70..c77f381f3c6d6cfe440c08145675862e6c511f6a 100644 (file)
--- a/rlogin.c
+++ b/rlogin.c
@@ -25,6 +25,11 @@ static void c_write (char *buf, int len) {
 }
 
 static int rlogin_receive (Socket s, int urgent, char *data, int len) {
+    if (urgent==3) {
+        /* A socket error has occurred. */
+        connection_fatal(data);
+        len = 0;
+    }
     if (!len) {
        /* Connection has closed. */
        sk_close(s);