From 90ec203318a167505ae1038bdcdc7d2ce664a1eb Mon Sep 17 00:00:00 2001 From: Dave Cheney Date: Sun, 13 Nov 2011 12:13:46 -0500 Subject: [PATCH] exp/ssh: ensure initial window advertisement is not lost Some remote servers send a 0 window size in the channel open confirm msg, others send a non zero window size. Make sure this initial advertisement is not lost. R=agl, rsc, cw CC=golang-dev https://golang.org/cl/5372083 --- src/pkg/exp/ssh/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg/exp/ssh/client.go b/src/pkg/exp/ssh/client.go index da45688eee0..669182b2c80 100644 --- a/src/pkg/exp/ssh/client.go +++ b/src/pkg/exp/ssh/client.go @@ -195,6 +195,7 @@ func (c *ClientConn) openChan(typ string) (*clientChan, error) { switch msg := (<-ch.msg).(type) { case *channelOpenConfirmMsg: ch.peersId = msg.MyId + ch.win <- int(msg.MyWindow) case *channelOpenFailureMsg: c.chanlist.remove(ch.id) return nil, errors.New(msg.Message)