Add FlipperServerDisconnectedError to prevent excessive error logging
Reviewed By: passy Differential Revision: D51393196 fbshipit-source-id: f49857b397a3fb629ad44f89a4c59b12ba2f67c4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7c972a982a
commit
d515342526
@@ -14,6 +14,7 @@ import {
|
||||
FlipperServerCommands,
|
||||
FlipperServerExecOptions,
|
||||
ServerWebSocketMessage,
|
||||
FlipperServerDisconnectedError,
|
||||
} from 'flipper-common';
|
||||
import ReconnectingWebSocket from 'reconnecting-websocket';
|
||||
|
||||
@@ -90,7 +91,7 @@ export function createFlipperServerWithSocket(
|
||||
onStateChange(FlipperServerState.DISCONNECTED);
|
||||
|
||||
pendingRequests.forEach((r) =>
|
||||
r.reject(new Error('flipper-server disconnected')),
|
||||
r.reject(new FlipperServerDisconnectedError('ws-close')),
|
||||
);
|
||||
pendingRequests.clear();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user