You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
APPROVERS: This fix may need to port to C#. Please check C# source code and port accordingly.
Description
When Web Socket disconnected, all pending requests should be rejected.
Specific Changes
Added RequestManager.rejectAllResponses() to reject all pending responses
Updated browserWebSocketClient and nodeWebSocketClient to call RequestManager.rejectAllResponses() on disconnection
Fixed inconclusive tests related to .to.throw
Fixed a racing condition in ProtocolAdapter
If server respond quickly, some responses may be dropped
This is because their respective requests are registered in RequestManager only after the request is send, the response may already get through
Testing
Added tests to make sure NodeWebSocketClient and WebSocketServer can communicate with each other by using real Web Socket. This should make our test more stable.
Note: because there is no infrastructure for testing BrowserWebSocketClient, there are no tests added for it.
Additional context
This fix is related to an issue in botframework-directlinejs. When postActivity() is called after disconnection, it is not failing.
botframework-directlinejs did not fail the call because botframework-streaming does not reject any pending requests.
The text was updated successfully, but these errors were encountered:
ceciliaavila
added
bug
Indicates an unexpected problem or an unintended behavior.
parity
The issue describes a gap in parity between two or more platforms.
labels
Apr 27, 2023
The changes in fix: [#4452][#4456][#4460][botframework-streaming] Should reject pending requests on disconnection may need to be ported to maintain parity with microsoft/botbuilder-dotnet.
The text was updated successfully, but these errors were encountered: