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