dgrr / http2

HTTP/2 implementation for fasthttp
Apache License 2.0
208 stars 35 forks source link

panic: send on closed channel #55

Closed meehow closed 2 years ago

meehow commented 2 years ago

I'm getting this panic pretty regularly (despite using recover middleware):

panic: send on closed channel
goroutine 4449 [running]:
github.com/dgrr/http2.(*serverConn).writePing(0xc000253340)
        github.com/dgrr/http2@v0.3.4/serverConn.go:148 +0xad
github.com/dgrr/http2.(*serverConn).sendPingAndSchedule(0xc000253340)
        github.com/dgrr/http2@v0.3.4/serverConn.go:940 +0x1e
created by time.goFunc
        time/sleep.go:180 +0x31
dgrr commented 2 years ago

Try v0.3.5. Thanks for the report.

fckveza commented 1 year ago

same problem

panic: send on closed channel

goroutine 774 [running]: github.com/dgrr/http2.(Ctx).resolve(...) /root/go/src/github.com/dgrr/http2/client.go:58 github.com/dgrr/http2.(Conn).writeLoop.func2.1({0xc000264488?, 0x73fac0?}, {0x722e40?, 0xc000103060?}) /root/go/src/github.com/dgrr/http2/conn.go:414 +0x4d sync.(Map).Range(0xc000264480?, 0xc00022ee68) /usr/local/go/src/sync/map.go:354 +0x2b8 github.com/dgrr/http2.(Conn).writeLoop.func2() /root/go/src/github.com/dgrr/http2/conn.go:412 +0x1d6 github.com/dgrr/http2.(Conn).writeLoop(0xc0002643c0) /root/go/src/github.com/dgrr/http2/conn.go:471 +0x40a created by github.com/dgrr/http2.(Conn).Handshake /root/go/src/github.com/dgrr/http2/conn.go:239 +0x76 exit status 2