• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

medplum / medplum / 27444664268
92%
main: 92%

Build:
Build:
LAST BUILD BRANCH: kevin-documents
DEFAULT BRANCH: main
Ran 12 Jun 2026 09:54PM UTC
Jobs 1
Files 824
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jun 2026 09:40PM UTC coverage: 92.489% (+0.002%) from 92.487%
27444664268

push

github

web-flow
fix(ws): tear down WebSocket subscription Redis listener on shutdown (#9494)

* fix(ws): tear down WebSocket subscription Redis listener on shutdown

The module-level pub/sub subscriber for WebSocket subscription fan-out was
never cleared when closeWebSockets ran, leaving a disconnected client in
module state after shutdown. Disconnect and reset it during WebSocket shutdown,
and register an ioredis end listener so the module reference is dropped when
the connection closes, allowing setupSubscriptionHandler to run again on bind.

Signed-off-by: Karl Pietrzak <karl@medplum.com>

* test(ws): verify subscription Redis subscriber is recreated after end

Assert that disconnecting the pub/sub subscriber clears module state via
the end listener and that binding a new WebSocket subscription socket calls
getPubSubRedisSubscriber again.

Signed-off-by: Karl Pietrzak <karl@medplum.com>

* fixed test

Signed-off-by: Karl Pietrzak <karl@medplum.com>

* [autofix.ci] apply automated fixes

* test fixes

Signed-off-by: Karl Pietrzak <karl@medplum.com>

* refactored a bit to simplify code complexity (SonarQube)

Signed-off-by: Karl Pietrzak <karl@medplum.com>

---------

Signed-off-by: Karl Pietrzak <karl@medplum.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

24572 of 27364 branches covered (89.8%)

Branch coverage included in aggregate %.

60 of 66 new or added lines in 2 files covered. (90.91%)

36847 of 39043 relevant lines covered (94.38%)

23227.98 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
86.73
0.53% packages/server/src/ws/subscriptions.ts
Jobs
ID Job ID Ran Files Coverage
1 27444664268.1 12 Jun 2026 09:54PM UTC 1375
92.28
GitHub Action Run
Source Files on build 27444664268
  • Tree
  • List 824
  • Changed 435
  • Source Changed 2
  • Coverage Changed 435
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27444664268
  • 52e01db3 on github
  • Prev Build on gh-readonly-queue/main/pr-9435-c6b9142c6c7df118c6e9b8cc3f35f7f0929658e3 (#27441976931)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc