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

mizosoft / methanol / #239
89%

Build:
DEFAULT BRANCH: master
Ran 29 Apr 2024 03:01PM UTC
Jobs 1
Files 135
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 Apr 2024 02:53PM UTC coverage: 91.336% (+0.03%) from 91.303%
#239

push

github

web-flow
Fix missed response for HttpResponsePublisher (#69)

Because `onResponse(response)` decrements `ongoing` prematurely (before
submitting the response and potentially completing downstream), the last
response passed might be missed when a race happens with
`onInitialResponseBodyCompletion()`. Consider this scenario:

 - `onResponse` & `onInitialResponseBodyCompletion` interleave.
 - `onResponse` acquires the lock first, and decrements `ongoing`. It
   won't perceive initial body completion, so it won't want to complete
   downstream.
 - `onInitialResponseBodyCompletion` acquires the lock later, and perceives
   no ongoing responses, so it proceeds with the intent to complete downstream.
 - `onInitialResponseBodyCompletion` continues, and calls `complete()`, which
   pushes the sentinel to the queue.
 - `onResponse` continues to `submit(response)`, but the response is submitted
   after the sentinel and is hence ignored.

The fix is to not prematurely decrement `ongoing` when the last response is received,
but do so after the response is submitted. This way, `onInitialResponseBodyCompletion`
never perceives a completed stream that is not **really** completed.

7 of 7 new or added lines in 1 file covered. (100.0%)

6684 of 7318 relevant lines covered (91.34%)

0.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #239.1 29 Apr 2024 03:01PM UTC 0
91.34
Source Files on build #239
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #239
  • c99b77d6 on github
  • Prev Build on master
  • Next Build on master
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