Skip to content

Conversation

@berkant
Copy link

@berkant berkant commented Oct 17, 2025

Description

While the issue was originally about discussing why turn would fall back to indications after a while in a long-lived connection, tracing down into the code revealed stale nonces aren't being handled whatsoever by the bind() method, causing channel bindings to time out and transition to failed state, forcing the connection to go 2-way over indications for the rest of its life.

This PR adds code handling stale nonce errors to ChannelBind requests. It also decouples logic related to binding lifecycle (initial binding & binding renewal) from WriteTo by carving out code into a timer, similar to the way perms and allocs work.

Reference issue

Fixes #471

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.26%. Comparing base (55f84c2) to head (005a1d6).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
internal/client/udp_conn.go 89.47% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #481      +/-   ##
==========================================
+ Coverage   68.54%   71.26%   +2.71%     
==========================================
  Files          45       45              
  Lines        3300     2624     -676     
==========================================
- Hits         2262     1870     -392     
+ Misses        865      581     -284     
  Partials      173      173              
Flag Coverage Δ
go 71.26% <91.66%> (+2.71%) ⬆️
wasm ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@berkant
Copy link
Author

berkant commented Oct 19, 2025

@JoeTurki WDYT?

@JoeTurki
Copy link
Member

JoeTurki commented Oct 24, 2025

@berkant Thank you so much, I like this change, I'll review it again in details either tonight or this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Force use of channels

2 participants