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

Logout abandons pending queued messages #168

Open
tripleee opened this issue Oct 25, 2021 · 0 comments
Open

Logout abandons pending queued messages #168

tripleee opened this issue Oct 25, 2021 · 0 comments

Comments

@tripleee
Copy link
Contributor

tripleee commented Oct 25, 2021

The logout action in its current form rather brutally disconnects the chat client without waiting for pending messages to be delivered. This behavior surprised me. Should it perhaps be more soft, and/or should there be a separate function which waits for the queue to drain before it disconnects?

I have logic implementing this behavior in Sloshy, but I'm not entirely sure how it should be exposed in the library.

Proposal A: update the function so it does what I expected. Might break somebody's code where their expectation was different?

Proposal B: simply implement a new function and just mention in the documentation for the legacy function that you probably want the other one. Simple but inelegant.

Proposal C: add a keyword flag and plan a transition where eventually the function will fail if you don't pass in an explicit flag to select which behavior you want. Pesky for multiple reasons when at minimum it will require us to commit to two future upgrades to roll out the new behavior.

Maybe there is a plan D which marries the best of these proposals. Rename the function and start displaying a warning if you use the old name?

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

No branches or pull requests

1 participant