njones / socketio

A Modern SocketIO library for go
MIT License
60 stars 9 forks source link

socket-io: Do events on same socket support concurrency? #82

Open laagland opened 11 months ago

laagland commented 11 months ago

Hi,

It seems like concurrent handling of events on the same socket is not working. If a specific client sends multiple events to the server, events are only handled if the previous event is completely finished. This is not expected behavior and my implementation is not very complex. Is this a bug? Or could it be that my own code is the culprit.

Thanks

njones commented 8 months ago

All tests are done to support running concurrently, and this includes sending multiple events to the same socket.

go test -timeout 40s -run ^TestServerV4/sending_to_all_connected_clients.Polling$ github.com/njones/socketio -race -v

If this test doesn't cover the case you are expecting can you please update this question with an example.