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

Drop socket before client reconnect #97

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

UkoeHB
Copy link
Collaborator

@UkoeHB UkoeHB commented Nov 14, 2023

Problem

When a client goes through a reconnect cycle, it does not drop its socket until after reconnecting. This means messages can be stuck inside the socket sink's buffer indefinitely, with their message status hanging in MessageStatus::Sending. To improve responsiveness, it would be better to drop the socket immediately so message statuses update promptly.

Solution

  • Refactor ClientActor::run() so the socket can be dropped before trying to reconnect.
  • Clean up the implementation by refactoring into multiple functions.

@UkoeHB UkoeHB merged commit b31a878 into gbaranski:master Nov 14, 2023
3 checks passed
@UkoeHB UkoeHB deleted the socket_cleanup branch November 14, 2023 04:40
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.

1 participant