Commit 64f0445
fix(ddp-streamer): use graceful ws.close() on user.forceLogout
The microservices ddp-streamer was using ws.terminate() (TCP RST) for
broadcast force-logouts. The monolith path uses session.connectionHandle.close()
which is graceful and flushes the WS buffer first — letting the
`notify-user/<uid>/force_logout` stream message (queued by
apps/meteor/server/modules/listeners/listeners.module.ts:49) reach the
client before the socket goes down.
In EE that stream message races with the terminate, terminate wins, the
client's useForceLogout hook never fires, and tests like
e2e-encryption/e2ee-passphrase-management.spec.ts:87 are left with
stale localStorage credentials and a Login button that never hides.
Switch to ws.close() with a 5s setTimeout fallback to terminate() for
unresponsive sockets — matches the graceful-close semantics the
monolith already relies on without losing the safety net for zombies.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5e5ec97 commit 64f0445
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
64 | 80 | | |
65 | 81 | | |
66 | 82 | | |
| |||
0 commit comments