Fix session-expired event causing events to stop
If a session-expired event is hit that does not match the current session then it should be ignored and event processing continue without it. This was incorrectly implemented and instead event processing would stop when any session-expired event was hit, not just the ones matching the current session. Fix logic to properly ignore session-expired events when it doesn't match the current session.
This commit is contained in:
parent
80cec71308
commit
5d4cdb7b83
1 changed files with 2 additions and 1 deletions
|
@ -192,9 +192,10 @@ function sendEventToStream(stream: EventStream, event: ApiEvent) {
|
|||
if (event.type === "session-expired") {
|
||||
if (stream.sessionId === event.sessionId) {
|
||||
stream.close("session expired");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Account events are specially handled and only sent to the user they belong to.
|
||||
if (event.type === "account-update") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue