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

enbility / ship-go
93%

Build:
DEFAULT BRANCH: dev
Repo Added 14 Jan 2024 07:40PM UTC
Files 46
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

LAST BUILD ON BRANCH dev
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • auto_accept_stalls_ship
  • bug/attempt_reconnect_when_device_reappears
  • bug/autoAcceptAnnouncement
  • bug/avahi_dead_lock
  • bugfix/race-condition
  • chore/redundant-nil-checks
  • dev
  • docs/testspec-coverage-comments
  • feat/dynamicMdnsInterfaceManagement
  • feat/hub-bound-port
  • feat/mdns-remote-addresses
  • feature/action-update
  • feature/analysis-docs
  • feature/bugfixes
  • feature/hub-improvements
  • feature/json-parsing-improvements
  • feature/maintenance
  • feature/mdns-restart-improvements
  • feature/register-improvements
  • feature/shippairing-2
  • feature/tls-improvements
  • fix/avahi-remove-per-instance
  • fix/connection-attempt-flag-leak-on-unknown-service
  • fix/double-connection-outgoing-dedup
  • fix/hub-connection-bugs
  • fix/hub_connections_test
  • fix/json-whitespace-tolerance
  • fix/link-local-dial-loglevel
  • fix/mdns-autoaccept-txt-update
  • fix/mdns-deadlock-and-unreported-read-pump-panic
  • fix/mdns-service-type-case-sensitivity
  • fix/pairing-issues-and-trust-dupes
  • fix/pairing-reactivate-listener-on-addCu-removal
  • fix/pairing-startup-listener-guard
  • fix/pairing-txt-format-validation
  • fix/prevent-stuck-shutdown-test-goroutine-leak
  • fix/protocol-handshake-error-envelope
  • fix/qr-ski-spacing
  • fix/race-job-timeout
  • fix/reannounce-entrygroup-leak
  • fix/remove-unused-announcement-cancel-ctx
  • fix/ship-double-connection
  • fix/ship-handshake-conformance
  • fix/ship-hello-prolongation-increase
  • fix/ship-sec-abort-tls-on-spoofed-cert
  • fix/ship-tests-tc-ship-amdata-002
  • fix/spine-write-error-teardown
  • fix/stop-announcement-cancels-lifetime-timer
  • fix/trusted-reconnect-mdns-drop
  • fix/ws-flush-queue-on-closing
  • fix_issue_49
  • main
  • safer-connection-attempt-running-handling
  • update-to-zeroconf-v3
  • upstream/reset-connection-backoff

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

Relevant lines Covered
Build:
Build:
6629 RELEVANT LINES 6171 COVERED LINES
10773.41 HITS PER LINE
Source Files on dev
  • Tree
  • List 46
  • Changed 5
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
43866738818 dev 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 cal... push 16 Nov 2026 12:30PM UTC web-flow github
93.09
42002190200 upstream/reset-connection-backoff Merge 82c4ad418 into a84426bc3 Pull #110 05 Nov 2026 09:28AM UTC web-flow github
93.11
42000316881 fix/reannounce-entrygroup-leak Merge 5b552c2be into a84426bc3 Pull #109 05 Nov 2026 09:15AM UTC web-flow github
93.14
41417535437 fix/avahi-remove-per-instance Merge b518c6ee3 into a84426bc3 Pull #128 02 Nov 2026 09:05AM UTC web-flow github
93.11
40680092351 fix/stop-announcement-cancels-lifetime-timer Merge f40e0b6f4 into a84426bc3 Pull #127 28 Oct 2026 11:31AM UTC web-flow github
93.06
38763290484 feat/mdns-remote-addresses Merge 08bb59845 into a84426bc3 Pull #126 15 Oct 2026 03:49PM UTC web-flow github
93.03
35865376110 fix/mdns-autoaccept-txt-update Merge 6a4fbc735 into d2eb91a6c Pull #125 28 Sep 2026 11:17AM UTC web-flow github
93.24
36413688379 dev fix(hub): don't strand the connection attempt flag when the service is gone (#123) May fix some failed connection attempts by the living lab after reregistering SKIs. coordinateConnectionInitations sets connectionAttemptRunning for a SKI and rai... push 28 Sep 2026 11:10AM UTC web-flow github
93.03
36413409072 dev fix(ws): deliver queued SHIP messages before closing the connection (#120) Callers queue a final SHIP message and close in the same breath: abortProtocolHandshake sends its "protocol handshake error", the CMI rejection sends its reply. The messag... push 28 Sep 2026 11:07AM UTC web-flow github
93.08
35857457127 fix/mdns-deadlock-and-unreported-read-pump-panic Merge d2eb91a6c into 5cd9a30bf Pull #124 23 Sep 2026 12:00PM UTC web-flow github
93.16
See All Builds (304)
  • Repo on GitHub
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