From: Dave Cheney Date: Sun, 13 Nov 2011 17:13:46 +0000 (-0500) Subject: exp/ssh: ensure initial window advertisement is not lost X-Git-Tag: weekly.2011-11-18~92 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=90ec203318a167505ae1038bdcdc7d2ce664a1eb;p=gostls13.git 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 --- diff --git a/src/pkg/exp/ssh/client.go b/src/pkg/exp/ssh/client.go index da45688eee..669182b2c8 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)