Skip to content

Commit 95e8de7

Browse files
authored
Merge pull request #79 from xconnio/handle-goodbye-abort
handle goodbye & abort in session
2 parents 590d931 + 3d29f55 commit 95e8de7

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

lib/session.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,13 @@ export class WAMPSession {
182182
}
183183
break;
184184
}
185-
186-
case Goodbye.TYPE: {
187-
return msg;
188-
}
189-
190-
case Abort.TYPE: {
191-
return msg;
192-
}
193-
194185
default:
195186
throw Error(`unknown error message type ${typeof msg}`)
196187
}
188+
} else if (msg instanceof Abort) {
189+
// No handling needed, just return the message
190+
} else if (msg instanceof Goodbye) {
191+
// No handling needed, just return the message
197192
} else {
198193
throw Error(`unknown message ${typeof msg}`)
199194
}

0 commit comments

Comments
 (0)