We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0b22c6 commit 2a8565fCopy full SHA for 2a8565f
lib/namespace.ts
@@ -358,12 +358,15 @@ export class Namespace<
358
typeof sessionId === "string" &&
359
typeof offset === "string"
360
) {
361
- const session = await this.adapter.restoreSession(sessionId, offset);
+ let session;
362
+ try {
363
+ session = await this.adapter.restoreSession(sessionId, offset);
364
+ } catch (e) {
365
+ debug("error while restoring session: %s", e);
366
+ }
367
if (session) {
368
debug("connection state recovered for sid %s", session.sid);
369
return new Socket(this, client, auth, session);
- } else {
- debug("unable to restore session state");
370
}
371
372
return new Socket(this, client, auth);
0 commit comments