Comment by microtherion
3 years ago
The code in question seems to be this portion of SendMessageWithData in ssh/protocol.go [1]:
buf := make([]byte, 32768)
for {
n, err := data.Read(buf)
if n > 0 {
err := conn.pl.WritePacket(buf[0:n])
if err != nil {
return err
}
}
if err != nil {
break
}
}
The write packet size seems to be determined by how much data the reader returns at a time. That could backfire if the reader were e.g. something like line at a time (no idea if something like that exists in Golang), but that does not seem to be the case here.
[1] https://github.com/git-lfs/git-lfs/blob/d3716c9024083a45771c...
No comments yet
Contribute on Hacker News ↗