]> Cypherpunks repositories - gostls13.git/commitdiff
exp/ssh: ensure initial window advertisement is not lost
authorDave Cheney <dave@cheney.net>
Sun, 13 Nov 2011 17:13:46 +0000 (12:13 -0500)
committerAdam Langley <agl@golang.org>
Sun, 13 Nov 2011 17:13:46 +0000 (12:13 -0500)
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

index da45688eee08ca362a471a8c0eed54386006b3ef..669182b2c80b0bee2a05d40142824e52328c9513 100644 (file)
@@ -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)