Skip to content

ts_netstack_smoltcp: tcp half-close - #469

Closed
nrc wants to merge 1 commit into
mainfrom
nrc/half-close
Closed

nrc wants to merge 1 commit into
mainfrom
nrc/half-close

Conversation

@nrc

@nrc nrc commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Add TcpStream::shutdown to close only the sending half of a connection. Drop blocked commands whose requester has gone away rather than completing them and discarding the result.

Extracted from #462

AI decl: basically vibe-coded. I've tried to review but I don't have enough context to know if this is the right approach or that it works properly.

cc @npry

Add TcpStream::shutdown to close only the sending half of a connection. Drop blocked commands whose requester has gone away rather than completing them and discarding the result.

Signed-off-by: Nick Cameron <nrc@ncameron.org>

@npry npry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cancellation piece is a dup of #466, hence the conflicts.

We actually need a fix here, which I think is to make the current Close command .abort() the socket rather than .close() (since .close() is really half-close) and yeah, I agree with calling it shutdown since it's the same API as std/tokio TcpStream. I think it probably makes sense to do those simultaneously, but I'd want some actual network tests proving correct behavior. If you don't want to dive into that we might want to have me or dylan take it -- let's chat at sync

@nrc nrc closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants