mirror of
https://github.com/golang/go
synced 2024-11-22 10:54:46 -07:00
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
This commit is contained in:
parent
06ef97e15d
commit
90ec203318
@ -195,6 +195,7 @@ func (c *ClientConn) openChan(typ string) (*clientChan, error) {
|
|||||||
switch msg := (<-ch.msg).(type) {
|
switch msg := (<-ch.msg).(type) {
|
||||||
case *channelOpenConfirmMsg:
|
case *channelOpenConfirmMsg:
|
||||||
ch.peersId = msg.MyId
|
ch.peersId = msg.MyId
|
||||||
|
ch.win <- int(msg.MyWindow)
|
||||||
case *channelOpenFailureMsg:
|
case *channelOpenFailureMsg:
|
||||||
c.chanlist.remove(ch.id)
|
c.chanlist.remove(ch.id)
|
||||||
return nil, errors.New(msg.Message)
|
return nil, errors.New(msg.Message)
|
||||||
|
Loading…
Reference in New Issue
Block a user