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

✨ Add #logout! to combine logout and disconnect #178

Merged
merged 2 commits into from
Sep 23, 2023

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Sep 22, 2023

A logout command that also disconnects, even if logout raises an exception, and doesn't raise exceptions when already disconnected would be very useful in situations where the connection MUST be gracefully closed, e.g. for security or tests.

Although the change is relatively insignificant, changing #logout to also ignore exceptions and immediately call #disconnect would be backwards incompatible. So a new method was created.

A logout command that also disconnects, even if logout raises an
exception, and doesn't raise exceptions when already disconnected would
be very useful in situations where the connection MUST be gracefully
closed, e.g. for security or tests.

Although the change is relatively insignificant, changing #logout to
also ignore exceptions and immediately call #disconnect would be
backwards incompatible.  So a new method was created.
@nevans
Copy link
Collaborator Author

nevans commented Sep 23, 2023

I wrote this as part of #179 (which was itself written as part of #172).

@nevans nevans merged commit 6cd6d87 into ruby:master Sep 23, 2023
11 checks passed
@nevans nevans deleted the logout-bang branch September 23, 2023 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant