X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssh.c;h=fe163c0b6b05d5effbe09d7557d7d3f61e63c0ca;hb=382ffaf0262c8b552cf5bd32dbf922ceacbf921d;hp=bb8441afe906ade1c37a87c2dc5e27a2d82db38b;hpb=994bb17c57d78cb9e9457c641c4bd161393595a1;p=PuTTY.git diff --git a/ssh.c b/ssh.c index bb8441af..fe163c0b 100644 --- a/ssh.c +++ b/ssh.c @@ -4864,12 +4864,25 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) * See if that was the last channel left open. */ if (count234(ssh_channels) == 0) { +#if 0 + /* + * We used to send SSH_MSG_DISCONNECT here, + * because I'd believed that _every_ conforming + * SSH2 connection had to end with a disconnect + * being sent by at least one side; apparently + * I was wrong and it's perfectly OK to + * unceremoniously slam the connection shut + * when you're done, and indeed OpenSSH feels + * this is more polite than sending a + * DISCONNECT. So now we don't. + */ logevent("All channels closed. Disconnecting"); ssh2_pkt_init(SSH2_MSG_DISCONNECT); ssh2_pkt_adduint32(SSH2_DISCONNECT_BY_APPLICATION); ssh2_pkt_addstring("All open channels closed"); ssh2_pkt_addstring("en"); /* language tag */ ssh2_pkt_send(); +#endif ssh_state = SSH_STATE_CLOSED; crReturnV; }