0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

don't dangle

This commit is contained in:
Zack Scholl 2019-04-29 15:46:40 -06:00
parent ef25c556a9
commit 5b0c52a97b

View file

@ -162,7 +162,7 @@ func clientCommuncation(port string, c *comm.Comm) (err error) {
// chanFromConn creates a channel from a Conn object, and sends everything it
// Read()s from the socket to the channel.
func chanFromConn(conn net.Conn) chan []byte {
c := make(chan []byte)
c := make(chan []byte, 1)
go func() {
b := make([]byte, TCP_BUFFER_SIZE)
@ -181,6 +181,7 @@ func chanFromConn(conn net.Conn) chan []byte {
break
}
}
log.Debug("exiting")
}()
return c