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

decentraland / social-service-ea / 28379017890
90%

Build:
DEFAULT BRANCH: main
Ran 29 Jun 2026 02:26PM UTC
Jobs 1
Files 201
Run time 1min
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

29 Jun 2026 02:21PM UTC coverage: 89.925% (+0.1%) from 89.819%
28379017890

push

github

web-flow
fix: cancel unconsumed fetch response bodies to avoid undici socket leaks (#421)

* fix: cancel unconsumed fetch response bodies to avoid undici socket leaks

After the migration to native fetch (@dcl/fetch-component / undici), the
keep-alive socket backing a response stays pinned until the body is read or
cancelled. Paths that discard a response without consuming the body (non-ok
early throws/returns, void success paths, and fire-and-forget requests) leaked
those sockets until GC.

Add a drainResponse helper (src/utils/fetch.ts) that cancels the body only when
it hasn't been read, and apply it at every discard site:

- adapters/comms-gatekeeper.ts: drain the !ok branch of every method; for the
  void methods (updateUserPrivateMessagePrivacyMetadata, endCommunityVoiceChatRoom,
  requestToSpeakInCommunityVoiceChat, rejectSpeakRequestInCommunityVoiceChat,
  promoteSpeakerInCommunityVoiceChat, demoteSpeakerInCommunityVoiceChat,
  kickUserFromCommunityVoiceChat, muteSpeakerInCommunityVoiceChat) also drain the
  success path; endPrivateVoiceChat drains its new else branch;
  getCommunityVoiceChatStatus drains both the 404 return-null and the !ok throw.
- adapters/places-api.ts, adapters/archipelago-stats.ts, adapters/registry.ts
  (both fetch sites), logic/referral/referral.ts: drain the !ok branch.
- adapters/email.ts: drain the ok success return (the !ok path already reads text()).
- adapters/cdn-cache-invalidator.ts: capture the fire-and-forget request and drain it.
- logic/community/events.ts: drain the !ok return false branch.

adapters/rewards.ts already consumes the body on both paths (json() on ok,
text() in the error message), so it was left unchanged.

Verification: yarn build, eslint on changed files, full unit suite
(106 suites / 1596 tests) and full integration suite (49 suites / 602 tests)
all pass.

* refactor: rename drainResponse to discardResponseBody and fix events.ts drain ordering

Address PR review:
- Rename drainResponse -> discardRe... (continued)

2289 of 2696 branches covered (84.9%)

Branch coverage included in aggregate %.

72 of 79 new or added lines in 9 files covered. (91.14%)

1 existing line in 1 file now uncovered.

5753 of 6247 relevant lines covered (92.09%)

77.13 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
67.27
-1.9% src/adapters/comms-gatekeeper.ts
1
86.21
0.66% src/logic/referral/referral.ts

Coverage Regressions

Lines Coverage ∆ File
1
67.27
-1.9% src/adapters/comms-gatekeeper.ts
Jobs
ID Job ID Ran Files Coverage
1 28379017890.1 29 Jun 2026 02:26PM UTC 402
90.87
GitHub Action Run
Source Files on build 28379017890
  • Tree
  • List 201
  • Changed 157
  • Source Changed 8
  • Coverage Changed 157
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28379017890
  • dd17469e on github
  • Prev Build on 1.12.0 (#28372475772)
  • Next Build on main (#28393307615)
  • Delete
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