bitfinexcom / bitfinex-api-go

BITFINEX Go trading API - Bitcoin, Litecoin, and Ether exchange
https://www.bitfinex.com/
MIT License
309 stars 220 forks source link

panic: send on closed channel #218

Open calj opened 4 years ago

calj commented 4 years ago

Issue type

Brief description

panic: send on closed channel

goroutine 838 [running]:
github.com/bitfinexcom/bitfinex-api-go/v2/websocket.(*Client).handlePrivateChannel(0xc0001f62c0, 0xc000782c00, 0x3, 0x4, 0x0, 0x0)
    /go/pkg/mod/github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20200207184043-4d37e8d4be18/v2/websocket/channels.go:153 +0x2be
github.com/bitfinexcom/bitfinex-api-go/v2/websocket.(*Client).handleChannel(0xc0001f62c0, 0x0, 0xc0007d7000, 0x795, 0xe00, 0x0, 0x0)
    /go/pkg/mod/github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20200207184043-4d37e8d4be18/v2/websocket/channels.go:53 +0x572
github.com/bitfinexcom/bitfinex-api-go/v2/websocket.(*Client).handleMessage(0xc0001f62c0, 0x0, 0xc0007d7000, 0x795, 0xe00, 0x0, 0x0)
    /go/pkg/mod/github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20200207184043-4d37e8d4be18/v2/websocket/client.go:466 +0x24a
github.com/bitfinexcom/bitfinex-api-go/v2/websocket.(*Client).listenUpstream(0xc0001f62c0, 0xc0000e9740)
    /go/pkg/mod/github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20200207184043-4d37e8d4be18/v2/websocket/client.go:431 +0x19b
created by github.com/bitfinexcom/bitfinex-api-go/v2/websocket.(*Client).connectSocket
    /go/pkg/mod/github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20200207184043-4d37e8d4be18/v2/websocket/client.go:398 +0x1e2

Steps to reproduce

-

Additional Notes:

-

JacobPlaster commented 4 years ago

Thanks @calj, we will look into a fix for this.

StylishTriangles commented 3 years ago

I am running into this exact issue. It seems that #219 hasn't resolved it for me