mirror of https://github.com/schollz/croc.git
try fix
This commit is contained in:
parent
182a9fe2f4
commit
1954691f44
|
@ -136,7 +136,7 @@ func chanFromConn(conn net.Conn) chan []byte {
|
||||||
b := make([]byte, models.TCP_BUFFER_SIZE)
|
b := make([]byte, models.TCP_BUFFER_SIZE)
|
||||||
n, err := reader.Read(b)
|
n, err := reader.Read(b)
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
c <- b
|
c <- b[:n]
|
||||||
// res := make([]byte, n)
|
// res := make([]byte, n)
|
||||||
// // Copy the buffer so it doesn't get changed while read by the recipient.
|
// // Copy the buffer so it doesn't get changed while read by the recipient.
|
||||||
// copy(res, b[:n])
|
// copy(res, b[:n])
|
||||||
|
|
Loading…
Reference in New Issue