closeOnBeforeunload not working properly after upgrading to socketio v4.7.5 #5055
-
With following configuration when I try to leave the page on Firefox the socket connection is disconnected and if I try to log the reason for disconnection it says " transport error " |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@darrachequesne can you provide any input here? |
Beta Was this translation helpful? Give feedback.
-
Hi! When setting Reference: https://socket.io/docs/v4/client-options/#closeonbeforeunload |
Beta Was this translation helpful? Give feedback.
-
But if I set it to true is silently closes the transport and I am unable to emit any event. |
Beta Was this translation helpful? Give feedback.
Hi! When setting
closeOnBeforeunload: false
, the Socket instance will indeed emit adisconnect
event when the user reloads the page on Firefox.Reference: https://socket.io/docs/v4/client-options/#closeonbeforeunload