HTML5 - Bug

Monkey Forums/Monkey Bug Reports/HTML5 - Bug

Rushino(Posted 2013) [#1]
-


Rushino(Posted 2013) [#2]
Ok. This one was really nasty but ive fixed it like after 8 hours of searching. I am exhausted. Was due to a little delay of 10 ms between the disconnect of the websocket and the fact that it is really closed.

Closing it.. add an error message to a list but this message was added like 10 ms aftere the close.. so i couldnt do : Close then Clear Messages.. it wouldn't work.

So i emulated my own readyState to fix that error. Cause the one that came with webSockets native object is somewhat not accurate.

So before someone try to reconnect, you have to check if the socket is really closed.. and not in the Closing state.. but the native websocket object was passing from connected directly to closed.. but that didn't meant it was really closed.