X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/e354075ee40880f5df252ac85538922a97f2d5e3..df9888023b27a5d24c16ed857a10f391b440bd42:/ssh.c diff --git a/ssh.c b/ssh.c index 16ef0567..a3255a85 100644 --- a/ssh.c +++ b/ssh.c @@ -7094,6 +7094,15 @@ static void ssh2_msg_channel_close(Ssh ssh, struct Packet *pktin) } /* + * Abandon any buffered data we still wanted to send to this + * channel. Receiving a CHANNEL_CLOSE is an indication that + * the server really wants to get on and _destroy_ this + * channel, and it isn't going to send us any further + * WINDOW_ADJUSTs to permit us to send pending stuff. + */ + bufchain_clear(&c->v.v2.outbuffer); + + /* * Send outgoing EOF. */ sshfwd_write_eof(c);