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

enbility / ship-go / 43866738818
93%

Build:
DEFAULT BRANCH: dev
Ran 16 Nov 2026 12:30PM UTC
Jobs 1
Files 46
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

16 Nov 2026 12:27PM UTC coverage: 93.091% (+0.06%) from 93.027%
43866738818

push

github

web-flow
fix(hub): cancel the announcement lifetime timer when the announcement stops (#127)

## Problem
When the pairing connection completes, `HandleShipHandshakeStateUpdate`
starts the 15-minute announcement lifetime timer. When the timer expires
it calls `StopAnnouncementTo` for that SHIP ID. Two paths left that
timer running after its announcement was gone:
- `StopAnnouncementTo` didn't cancel it.
- `HandleConnectionClosed` cancels it only when the closed connection
still has a registry entry. An application that unregisters the service
and then disconnects, removes that entry before the close is handled.

The leftover timer then fires up to 15 minutes later and stops whatever
announcement to that SHIP ID is active by then. A new pairing request to
the same device that hasn't connected yet is ended early. If it has
connected, its own timer replaces the old one, so nothing happens.

## Fix
`StopAnnouncementTo` cancels the lifetime timer of the announcement it
removes. On expiry, the timer releases the tracker's lock before calling
`StopAnnouncementTo`, so cancelling from that path can't deadlock.

## Testing
- New `TestStopAnnouncementTo_CancelsLifetimeTimer` in
`QRAnnouncementTestSuite`. It starts the timer the way the handshake
does, with a 50 ms lifetime, stops the announcement, then starts a new
one to the same device. Without the fix the timer stays active and ends
the new announcement; with it, the new announcement survives. `-count=3`
passes.

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

2 existing lines in 1 file now uncovered.

6171 of 6629 relevant lines covered (93.09%)

10773.41 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
81.11
0.0% cert/cert.go
Jobs
ID Job ID Ran Files Coverage
1 43866738818.1 16 Nov 2026 12:30PM UTC 46
93.09
GitHub Action Run
Source Files on build 43866738818
  • Tree
  • List 46
  • Changed 5
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43866738818
  • 6762005b on github
  • Prev Build on dev (#36413688379)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc