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

LeConnectionOrientedChannel enters invalid state in race condition #257

Open
whitevegagabriel opened this issue Aug 24, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@whitevegagabriel
Copy link
Collaborator

LeConnectionOrientedChannel has a race condition:

  1. Call disconnect and enter state DISCONNECTING
  2. Receive on_disconnection_request and enter state DISCONNECTED
  3. Receive on_disconnection_response and see that state is not DISCONNECTING, log invalid state and return

Not sure what the best solution is here, but it seems valid (though unlikely) that one might receive a disconnection request before disconnect is done processing.

@barbibulle barbibulle self-assigned this Aug 24, 2023
@barbibulle barbibulle added the bug Something isn't working label Aug 24, 2023
@barbibulle
Copy link
Collaborator

Thanks for reporting this. It definitely looks like a race condition that should be avoided. I'll push a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants