Ignore stale replies

Summary: Changelog: ignore stale replies

Reviewed By: lblasa

Differential Revision: D32829739

fbshipit-source-id: 267f43f8e8f3dea60ee86187f7a7709fea09e5af
This commit is contained in:
Andrey Goncharov
2021-12-03 05:30:02 -08:00
committed by Facebook GitHub Bot
parent 0d94120928
commit 9fc1d3cfb9
3 changed files with 14 additions and 2 deletions

View File

@@ -97,6 +97,11 @@ class BrowserServerWebSocket extends SecureServerWebSocket {
// Upon initialization it sent a `getPlugins` request.
// We find that request and resolve it with the list of plugins we received from the `connect` message
const getPluginsCallbacks = clientConnection.matchPendingRequest(0);
if (!getPluginsCallbacks) {
return;
}
getPluginsCallbacks.resolve({
success: {plugins},
length: rawMessage.length,