[bf-streaming] Web Socket disconnected should rejects all ongoing requests #4452
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.
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.
4.19.3
What nodejs version are you using
18
What browser version are you using
No
What os are you using
Ubuntu
Describe the bug
RequestManager
keep tracks of all outgoing requests. More-or-less the call manager of RPC.When a Web Socket disconnected,
botframework-streaming
does not signalRequestManager
to reject all pending requests. Thus, all pending requests are kept forever and never returned.One failing case, after Web Socket disconnected, C2 can still send an activity. For that send request, despite it is disconnected and should fail, were never rejected and just keep on forever.
To Reproduce
Steps to reproduce the behavior:
DirectLineStreaming
viabotframework-directlinejs
packagepostActivity()
Expected behavior
postActivity()
should fail.However, it is not failing because
NodeWebSocketClient
andBrowserWebSocketClient
did not tellRequestManager
about the disconnection.While we can say
NodeWebSocketClient
/BrowserWebSocketClient
should signal disconnection, however,RequestManager
has no public members to reject all pending requests.Even worse, the requests at
RequestManager._pendingRequests
are not rejectable. There are no way to callpendingRequest.reject()
function.That means, no requests can be rejected regardless of whatever situation. This means, either a request resolved, or keep on forever.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: