Closed michaelbeaumont closed 3 years ago
Actually, the panic may even be triggered by the application itself (regardless of the networking layer), if multiple goroutines attempt to send requests at the same time, so definitely worth having the mutex in place.
Nice catch, thanks!
I've run into the following error:
gorilla/websocket
is running these handlers concurrently and access tocallbacks
should thus be protected by aMutex
. This may also be an issue with the other packages, which I haven't looked at yet.