*: fix QUIC false error#4585
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4585 +/- ##
=======================================
Coverage 57.29% 57.29%
=======================================
Files 245 245
Lines 33537 33559 +22
=======================================
+ Hits 19215 19228 +13
- Misses 11882 11892 +10
+ Partials 2440 2439 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
There was a problem hiding this comment.
Pull request overview
This PR prevents benign QUIC “canceled stream” errors from failing request/response flows by treating that specific close error as non-fatal (especially when the peer has already reset the send direction), while still surfacing other close failures.
Changes:
- Treat “canceled stream” errors from
CloseWrite()inSendReceiveas benign (debug log + continue). - Replace repeated string checks with a shared helper
isCanceledStreamErr. - Add unit tests covering
isCanceledStreamErrbehavior (including wrapped errors).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| p2p/sender.go | Ignores benign canceled-stream errors on close paths (incl. CloseWrite) and centralizes detection logic in a helper. |
| p2p/sender_internal_test.go | Adds focused tests to lock in the helper’s behavior for nil/other/canceled/wrapped errors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



No need to error on closing the write if the stream was already canceled.
Change was provoked by this failing unit test:
https://github.com/ObolNetwork/charon/actions/runs/28664948834/job/85014276978?pr=4575
category: misc
ticket: none