Closed diegolmello closed 3 years ago
Instead of using code 1000, which is a Normal Closure, let's use one of the available for application codes (4000-4999). This PR changes it to use 4000 and checks for it directly instead of using 1000 and checking for disconnect reason.
Normal Closure
disconnect
Reference: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
Instead of using code 1000, which is a
Normal Closure
, let's use one of the available for application codes (4000-4999). This PR changes it to use 4000 and checks for it directly instead of using 1000 and checking fordisconnect
reason.Reference: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent