Skip to content

fix: Error when a client is disconnected as a result of attempting to send to it [MTT-4607] #2495

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

Merged
merged 2 commits into from
Apr 7, 2023

Conversation

ShadauxCat
Copy link
Collaborator

@ShadauxCat ShadauxCat commented Apr 7, 2023

This can happen in the case that the socket is detected to be closed in the send operation (i.e., EPIPE). The disconnect removed items from m_SendQueue while it was being iterated, and also resulted in a double-dispose on the FastBufferWriter being used for it.

fixes #2168
MTT-4607

Changelog

  • Fixed: Fixed some errors that could occur if a connection is lost and the loss is detected when attempting to write to the socket.

Testing and Documentation

  • Includes unit tests.
  • No documentation changes or additions were necessary.

@ShadauxCat ShadauxCat requested a review from a team as a code owner April 7, 2023 18:59
@ShadauxCat ShadauxCat changed the title fix: Error when a client is disconnected as a result of attempting to send to it fix: Error when a client is disconnected as a result of attempting to send to it [MTT-4607] Apr 7, 2023
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@NoelStephensUnity NoelStephensUnity merged commit 509a619 into develop Apr 7, 2023
@NoelStephensUnity NoelStephensUnity deleted the fix/disconnect_during_send branch April 7, 2023 19:57
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.

InvalidOperationException: Collection was modified;
2 participants