floatinghotpot / socket.io-unity

socket.io client for Unity, power game client with node.js back-end
494 stars 75 forks source link

No event is fired on disconnection #17

Open amsonline opened 6 years ago

amsonline commented 6 years ago

When the app connects to the server, everything is ok. But when I disconnect from my internet or close the server script, the event declared for EVENT_DISCONNECT is not being executed. I tried EVENT_CONNECT_ERROR, EVENT_RECONNECT_FAILED, EVENT_ERROR and EVENT_CONNECT_TIMEOUT, but none of them work. Also, when the app cannot connect to server, none of the events above work either.

Only when I manually disconnect the app from the server within the app itself, the code in EVENT_DISCONNECT is being triggered.

The plugin lacks a proper documentation and I cannot determine is it my fault or a bug in plugin itself.