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

[botframework-streaming] Race condition: requests missed when server respond quickly #4460

Closed
compulim opened this issue Apr 22, 2023 · 0 comments · Fixed by #4461
Closed
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@compulim
Copy link
Contributor

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Versions

What package version of the SDK are you using.
main

What nodejs version are you using
19

What browser version are you using
Unrelated

What os are you using
Unrelated

Describe the bug

When sending a request, if the processor respond quickly, the request may not be resolved. This is because they are queued up a bit too late.

To Reproduce

  1. Create a WebSocketServer and NodeWebSocketClient and connect them together
  2. On client side, call await nodeWebSocketClient.send()

Expected behavior

The send() call should resolve.

Instead, the send() call is never resolved/rejected.

Screenshots

Additional context

@compulim compulim added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Apr 22, 2023
compulim added a commit that referenced this issue Apr 24, 2023
…ing requests on disconnection (#4461)

* Fix inconclusive tests

* Rejects pending requests on disconnection

* isConnected should always return boolean

* Fix race condition of missed responses

* Add client/server tests

* Skip test if it is not on Windows

* Fix for Node.js 12

* Fix and skip failing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
1 participant