fix: preserve Remoter sends after peer write EOF - #163
Open
kentbull wants to merge 1 commit into
Open
Conversation
kentbull
force-pushed
the
fix/tcp-remoter-half-close
branch
3 times, most recently
from
August 15, 2026 20:53
d9daac1 to
a5a43d7
Compare
Contributor
Author
|
I reduced this PR to the focused directional-state change: Higher-level owners remain responsible for parsing accepted input, settling output, and final teardown. WebOfTrust/keripy#1614 demonstrates one consumer of that distinction. |
kentbull
force-pushed
the
fix/tcp-remoter-half-close
branch
3 times, most recently
from
August 15, 2026 23:13
f7df19f to
4528180
Compare
This was referenced Aug 15, 2026
Contributor
Author
|
The maintained 0.6 adaptation is merged as GLEIF-IT#3. |
kentbull
force-pushed
the
fix/tcp-remoter-half-close
branch
from
August 20, 2026 21:19
4528180 to
888c724
Compare
The prior .cutoff = True var prevented half-closed TCP connections from properly servicing the non-closed half. EOF on the sender side of a TCP connection prevented final response bytes being received by the sender from the receiver side of the TCP connection. New explicit states for both sides of the TCP connection clarify whether bytes can be sent or received and whether a connection is half closed, fully closed (terminated), or failed. The pre-existing cutoff var is supported yet deprecated.
kentbull
force-pushed
the
fix/tcp-remoter-half-close
branch
from
August 20, 2026 21:40
888c724 to
acbac15
Compare
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remoter.cutoffas the local receive-closure indicator.Remoter.txCutofffor independent transmit closure.serviceSends()to drain queued output after local receive observes peer write EOF.Why
TCP EOF is directional. When a peer closes its write direction, no more bytes can arrive from that peer, but the
Remotermay still send a response. Using receive cutoff to suppress transmission strands legitimate bytes intxbs.KERIpy PR #1614 demonstrates one affected consumer: a witness may need to finish sending receipt bytes after the controller has finished sending its request.
Boundary
This is a focused Remoter transport change, not a general close state machine. It does not change
Client, decide when higher-level protocols are complete, drain application parsers, or own final teardown. Higher-level owners remain responsible for parsing accepted input, settling output, and disposing of the endpoint.Related HTTP admission behavior is tracked by #195.