Closed andreygrehov closed 4 years ago
Ahh thanks @andreygrehov, seems like this was introduced with the num milit-ws connection multiplexer. Ill look into it now
Fixed in https://github.com/bitfinexcom/bitfinex-api-go/pull/186. The solution was to use a channel/writer pattern to ensure that websocket send messages are all processed synchronously on a single routine/thread.
@JacobPlaster thanks for a quick turnaround. Code reviewed the PR.
Merged in #186, this can be closed now.
Teamwork. Appreciate it @JacobPlaster.
Issue type
Brief description
Data race which is most likely caused by one concurrent reader/writer
gorilla/websocket
constraint. See https://godoc.org/github.com/gorilla/websocket#hdr-Concurrency for more details.Steps to reproduce
go run -race https://raw.githubusercontent.com/bitfinexcom/bitfinex-api-go/master/examples/v2/ws-book/main.go
Additional Notes: