go.crypto/ssh: Increase window size.
Increase window size for channels (session and tcpip) to 64 * max packet size (32 KB), which is the same value that OpenSSH uses. Also breaks out the relevant harcoded constants into named constants in channel.go. Fixes golang/go#6675. R=golang-dev, dave, hanwen, agl CC=golang-dev https://golang.org/cl/18120043
This commit is contained in:
+2
-2
@@ -567,8 +567,8 @@ func (c *ClientConn) NewSession() (*Session, error) {
|
||||
if err := c.transport.writePacket(marshal(msgChannelOpen, channelOpenMsg{
|
||||
ChanType: "session",
|
||||
PeersId: ch.localId,
|
||||
PeersWindow: 1 << 14,
|
||||
MaxPacketSize: 1 << 15, // RFC 4253 6.1
|
||||
PeersWindow: channelWindowSize,
|
||||
MaxPacketSize: channelMaxPacketSize,
|
||||
})); err != nil {
|
||||
c.chanList.remove(ch.localId)
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user