The project use gorilla/websocket library that use bufio library.
Neither are thread save. In order to share the same actioncable connection to multiple threads. I add 2 mutex more one for receiveMsg function. And other for connOnce in the case we call WriteJSON.
I don't make a pull request because I see that I changed something else in order to integrate the connection to a Rails 5 project with actioncable .
actioncable.go.txt
The project use gorilla/websocket library that use bufio library. Neither are thread save. In order to share the same actioncable connection to multiple threads. I add 2 mutex more one for receiveMsg function. And other for connOnce in the case we call WriteJSON.
I don't make a pull request because I see that I changed something else in order to integrate the connection to a Rails 5 project with actioncable . actioncable.go.txt