bgentry / actioncable-go

A golang ActionCable client
MIT License
7 stars 5 forks source link

Not thread save. #4

Open sirgroswell opened 4 years ago

sirgroswell commented 4 years ago

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

sirgroswell commented 4 years ago

I find a bug on my code. I update it. actioncable.go.txt