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
import{io}from"socket.io-client";constsocket=io("ws://localhost:3000/",{});socket.on("connect",()=>{console.log(`connect ${socket.id}`);});socket.on("disconnect",()=>{console.log("disconnect");});//invalid emit, correct shape would be {channel: 'channel name': data: {records: []}}socket.emit('notify',{records:[]})
We had an invalid emit in our code that resulted in us broadcasting (null, null) from the server. This was fine until a semi recent update to the socket.io-parser (socketio/socket.io-parser@3b78117). It causes the client to throw a parser error and to create a second connection to the hub, and slowly over time, this leaks a lot of connections.
I would expect that if the reconnection code is called on the client there is an attempt to safely close the old connection or to check that it is dead before attempting a reconnection. or to skip this behaviour for a parser error
Platform:
Device: M1 MacBook pro
OS: 14.1.1 (23B81)
The text was updated successfully, but these errors were encountered:
If a parser error is encountered the socket connection is restarted but the old one is not closed
https://github.com/socketio/socket.io-client/blob/4f6030f2c4394bc51d63fe27ed3310d95b9e0a74/lib/manager.ts#L425

Socket.IO server version:
4.1.2
Server
Socket.IO client version:
4.7.2
Client
We had an invalid emit in our code that resulted in us broadcasting
(null, null)
from the server. This was fine until a semi recent update to the socket.io-parser (socketio/socket.io-parser@3b78117). It causes the client to throw a parser error and to create a second connection to the hub, and slowly over time, this leaks a lot of connections.I would expect that if the reconnection code is called on the client there is an attempt to safely close the old connection or to check that it is dead before attempting a reconnection. or to skip this behaviour for a parser error
Platform:
The text was updated successfully, but these errors were encountered: