X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=x11fwd.c;h=7e9952395a0d3fafc63036cbda8b92f1ea688dab;hb=9b15a8010102fc83dcd7eef78014a65f11619d63;hp=b4fecd9a56b492733f5b1eb9460075be5bc543c7;hpb=1eb0308ad765bf4a603dcdb74bd7e0fa9784cf82;p=PuTTY.git diff --git a/x11fwd.c b/x11fwd.c index b4fecd9a..7e995239 100644 --- a/x11fwd.c +++ b/x11fwd.c @@ -106,6 +106,14 @@ static int x11_verify(char *proto, unsigned char *data, int dlen) { static int x11_receive (Socket s, int urgent, char *data, int len) { struct X11Private *pr = (struct X11Private *)sk_get_private_ptr(s); + if (urgent==3) { + /* + * A socket error has occurred. We have no way to + * communicate this down the forwarded connection, so we'll + * just treat it like a proper close. + */ + len = 0; + } if (!len) { /* Connection has closed. */ sshfwd_close(pr->c);