Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track client-initiated shutdown for any pipe type #2814

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bgrainger
Copy link

@bgrainger bgrainger commented Nov 11, 2024

Fixes #2652

Previously, RecordQuit only recorded a client-initiated QUIT if _ioPipe was a SocketConnection, which is not true when using SSL.

Since there is a 1-1 relationship between PhysicalConnection and _ioPipe, store whether the client initiated the shutdown on the PhysicalConnection object instead of (only) delegating it to SocketConnection.

The line var pipe = connectingPipe ?? _ioPipe seems irrelevant to this PR because connectingPipe is only set once, in ConnectedAsync, and would be relevant only if an exception were thrown between when pipe is set and when its value is assigned to _ioPipe (i.e., between lines 1612-15).

@bgrainger
Copy link
Author

(I'm not set on using Thread.VolatileRead/Write to store this information; it just seemed in line with what was already being done in SocketConnection.)

@bgrainger
Copy link
Author

The branch name is wrong; this actually fixes #2652.

@bgrainger
Copy link
Author

The PR CI job succeeded the first time: https://github.com/StackExchange/StackExchange.Redis/actions/runs/11786652807
This probably just needs to be re-run.

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.

RedisConnectionException: SocketClosed after Dispose of ConnectionMultiplexer
1 participant