sshnet: don't leak "Dialing" connections when "connect" ctl write gets interrupted

front
cinap_lenrek 2019-04-03 14:16:28 +02:00
parent 2251ef7a32
commit 81f3b1a233
1 changed files with 6 additions and 4 deletions

View File

@ -1086,11 +1086,13 @@ handlemsg(Msg *m)
c->sendpkt = pkt;
c->sendwin = win;
c->servernum = n;
c->state = Established;
if(c->wq != nil){
respond(c->wq, nil);
c->wq = nil;
if(c->wq == nil){
teardownclient(c);
break;
}
respond(c->wq, nil);
c->wq = nil;
c->state = Established;
break;
case MSG_CHANNEL_OPEN_FAILURE:
if(unpack(m, "_u____s", &chan, &s, &n) < 0)