buffstreams icon indicating copy to clipboard operation
buffstreams copied to clipboard

readLoop may memory leak

Open yalay opened this issue 6 years ago • 0 comments

func (t *TCPListener) readLoop(conn *TCPConn) {
	go func(c *TCPConn, s <-chan struct{}) {
		<-s
		c.Close()
	}(conn, t.shutdownChannel)
        for {
        // if this return, the routine above will never be stopped unless shutdownGroup is closed
        // incomingHeaderBuffer or outgoingDataBuffer may memory leak
        }
}

yalay avatar Oct 08 '18 03:10 yalay