X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0c6c9a7015c767b2e4a8ef78220fc52d8b72094c..0965bee0865fd8ea129b2de62a3c50e09c59a184:/x11fwd.c?ds=sidebyside 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);