X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/1bc8ef67371309ba94586d642b3e7f907ea3d392..88ea89339783ee587180b645981967f6cb8bcd20:/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);