=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/channels.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- src/usr.bin/ssh/channels.c 2000/05/01 19:11:35 1.53 +++ src/usr.bin/ssh/channels.c 2000/05/01 20:21:40 1.54 @@ -17,7 +17,7 @@ */ #include "includes.h" -RCSID("$Id: channels.c,v 1.53 2000/05/01 19:11:35 markus Exp $"); +RCSID("$Id: channels.c,v 1.54 2000/05/01 20:21:40 markus Exp $"); #include "ssh.h" #include "packet.h" @@ -250,7 +250,6 @@ channel_close_fds(Channel *c) { if (c->sock != -1) { - shutdown(c->sock, SHUT_RDWR); close(c->sock); c->sock = -1; } @@ -281,6 +280,8 @@ debug("channel_free: channel %d: dettaching channel user", id); c->dettach_user(c->self, NULL); } + if (c->sock != -1) + shutdown(c->sock, SHUT_RDWR); channel_close_fds(c); buffer_free(&c->input); buffer_free(&c->output);