Skip to content

Report a transport connection's failure the way a stream connection's is reported - #3273

Merged
mgravell merged 1 commit into
StackExchange:mainfrom
MDA2AV:transport-close-reports-failure
Oct 13, 2026
Merged

mgravell merged 1 commit into
StackExchange:mainfrom
MDA2AV:transport-close-reports-failure

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Context: integrating the experimental transport seam on ioxide (io_uring runtime) at https://github.com/MDA2AV/ioxide/tree/main/src/clients/ioxide.redis.stackexchange

Issue: when not using the stock transport, there is no notification when a connection dies, ConnectionFailed is not raised and commands awaiting a reply are cancelled insterad of failing with RedisConnectionException.

How this PR fixes it: RecordConnectionFailed only reports failure when _ioStream is set, adding _transportAdopted for when another transport is used instead.

Some more context:

IoxideTunnel.ConnectTransportAsync returns IoxideTransport so StackExchange.Redis takes the transport path and not the stream path, _ioStream stay null for the connection's life.
When the connection dies the check sees that _ioStream is null so the reporting is skipped.

@MDA2AV
MDA2AV marked this pull request as ready for review October 12, 2026 20:49
@mgravell
mgravell merged commit 209c46b into StackExchange:main Oct 13, 2026
5 checks passed
@mgravell

Copy link
Copy Markdown
Collaborator

LGTM; I'm interested how ioxide has found this - I'm assuming this is broadly similar to how SocketSet spikes this, but if ioxide does it better: great!

@mgravell

Copy link
Copy Markdown
Collaborator

@MDA2AV also: to emphasize - this API is deliberately [Experimental] precisely because I'm very interested in any "this doesn't fit" etc feedback; I used SocketSet to do a random test, but if you have feedback: throw it at me! Also, if you're looking for things to test against: GarnetServer also has a fairly extensible network API - see SocketSet.Garnet - it might be of interest to you.

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