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

share / sharedb / 1387
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/checkout-6
DEFAULT BRANCH: master
Ran 03 Apr 2020 10:01AM UTC
Jobs 3
Files 35
Run time 44s
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

pending completion
1387

Pull #358

travis-ci

web-flow
Only allow a single subscribe/unsubscribe request to be in-flight

This change is a rework of our subscribe/unsubscribe logic. At the
moment, subscribe and unsubscribe messages are handled completely
separately, which means that we can hit race conditions when
simultaneous subscribe and unsubscribe requests are submitted.

This currently manifests itself in this bug:

  1. `subscribe()`
  2. `unsubscribe()` synchronously (ie before receiving the `subscribe`
     response
  3. Expect to finish unsubscribed. Indeed, `Doc` claims that I'm
     unsubscribed, but actually - because subscribe happens to take a
     bit longer on the server - I'm really still subscribed

This change reworks subscribe and unsubscribe requests into a queue:

  - there may only ever be a single in-flight subscribe or unsubscribe
    request
  - other requests are queued and only submitted once we complete the
    in-flight request

# Special cases

In order to maintain existing behaviour, we also handle a couple of
special cases:

  - if there is _only_ a single subscription request (inflight, or
    pending), and a duplicate request is submitted by the client, we
    just roll the callback into the existing request
  - if the next request is an unsubscribe, we will immediately call back
    if disconnected (but we no longer call them if there is a preceding
    subscribe waiting)
Pull Request #358: Only allow a single subscribe/unsubscribe request to be in-flight

1429 of 1655 branches covered (86.34%)

71 of 71 new or added lines in 2 files covered. (100.0%)

3095 of 3179 relevant lines covered (97.36%)

537.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1387.1 03 Apr 2020 10:01AM UTC 0
97.36
Travis Job 1387.1
2 1387.2 03 Apr 2020 10:01AM UTC 0
97.36
Travis Job 1387.2
3 1387.3 03 Apr 2020 10:01AM UTC 0
97.36
Travis Job 1387.3
Source Files on build 1387
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1387
  • Pull Request #358
  • PR Base - master (#1383)
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