changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: sshnet: don't leak "Dialing" connections when "connect" ctl write gets interrupted

changeset 7129: 819322c2a38f
parent 7128: d9ebec7d14e8
child 7130: b7844d3b2bdf
author: cinap_lenrek@felloff.net
date: Wed, 03 Apr 2019 14:16:28 +0200
files: sys/src/cmd/sshnet.c
description: sshnet: don't leak "Dialing" connections when "connect" ctl write gets interrupted
     1.1--- a/sys/src/cmd/sshnet.c
     1.2+++ b/sys/src/cmd/sshnet.c
     1.3@@ -1086,11 +1086,13 @@ handlemsg(Msg *m)
     1.4 		c->sendpkt = pkt;
     1.5 		c->sendwin = win;
     1.6 		c->servernum = n;
     1.7+		if(c->wq == nil){
     1.8+			teardownclient(c);
     1.9+			break;
    1.10+		}
    1.11+		respond(c->wq, nil);
    1.12+		c->wq = nil;
    1.13 		c->state = Established;
    1.14-		if(c->wq != nil){
    1.15-			respond(c->wq, nil);
    1.16-			c->wq = nil;
    1.17-		}
    1.18 		break;
    1.19 	case MSG_CHANNEL_OPEN_FAILURE:
    1.20 		if(unpack(m, "_u____s", &chan, &s, &n) < 0)