diff --git a/lib/index.ts b/lib/index.ts index d82b27b..990bdf2 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -357,6 +357,9 @@ const registerVerboseListeners = ( ); socket.conn.on("upgrade", (transport: any) => { + if (!socket.data._admin) { + socket.data._admin = {}; + } socket.data._admin.transport = transport.name; adminNamespace.emit("socket_updated", { id: socket.id,