mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
refactor(proxy): add comment about packet size
This commit is contained in:
parent
bcac2250ec
commit
daff4d8913
1 changed files with 1 additions and 0 deletions
|
@ -322,6 +322,7 @@ func copyLoop(c1 io.ReadWriteCloser, c2 io.ReadWriteCloser, shutdown chan struct
|
|||
copyer := func(dst io.ReadWriteCloser, src io.ReadWriteCloser) {
|
||||
// Experimentally each usage of buffer has been observed to be lower than
|
||||
// 2K; io.Copy defaults to 32K.
|
||||
// This is probably determined by MTU in the server's `newHTTPHandler`.
|
||||
size := 2 * 1024
|
||||
buffer := make([]byte, size)
|
||||
// Ignore io.ErrClosedPipe because it is likely caused by the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue