1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Call sshfwd_unclean_close() in the event of a local socket error on a

forwarded X connection. (I somehow forgot to do this in r9364, despite
making the identical change in portfwd.c.)

[originally from svn r9470]
[r9364 == 49927f6c4d]
This commit is contained in:
Simon Tatham 2012-04-23 17:59:53 +00:00
parent 3225f3743e
commit 76a27757e6

View File

@ -503,16 +503,20 @@ static int x11_closing(Plug plug, const char *error_msg, int error_code,
{ {
struct X11Private *pr = (struct X11Private *) plug; struct X11Private *pr = (struct X11Private *) plug;
/* if (error_msg) {
* We have no way to communicate down the forwarded connection, /*
* so if an error occurred on the socket, we just ignore it * Socket error. Slam the connection instantly shut.
* and treat it like a proper close. */
* sshfwd_unclean_close(pr->c);
* FIXME: except we could initiate a full close here instead of } else {
* just an outgoing EOF? ssh.c currently has no API for that, but /*
* it could. * Ordinary EOF received on socket. Send an EOF on the SSH
*/ * channel.
sshfwd_write_eof(pr->c); */
if (pr->c)
sshfwd_write_eof(pr->c);
}
return 1; return 1;
} }