diff --git a/src/tcp/tcp.go b/src/tcp/tcp.go index 85a56bb..9e2421e 100644 --- a/src/tcp/tcp.go +++ b/src/tcp/tcp.go @@ -136,7 +136,7 @@ func chanFromConn(conn net.Conn) chan []byte { b := make([]byte, models.TCP_BUFFER_SIZE) n, err := reader.Read(b) if n > 0 { - c <- b + c <- b[:n] // res := make([]byte, n) // // Copy the buffer so it doesn't get changed while read by the recipient. // copy(res, b[:n])