You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! You can use the second argument of the disconnect event:
socket.on("disconnect",(reason,details)=>{console.log(reason);// "transport error"// in that case, details is an error objectconsole.log(details.message);"xhr post error"console.log(details.description);// 413 (the HTTP status of the response)// details.context refers to the XMLHttpRequest objectconsole.log(details.context.status);// 413console.log(details.context.responseText);// ""});
socket.io: 4.6.1
socket.io-client: 4.6.1
The text was updated successfully, but these errors were encountered: