Skip to content

Commit b097413

Browse files
vzaidmanfacebook-github-bot
authored andcommittedFeb 13, 2025·
increase ping-pong timeout before killing WS connection to DevTools (#49358)
Summary: Pull Request resolved: #49358 When the network is under strain, the code responsible for detecting if the inspector proxy's connection to the client has been lost may incorrectly assume the connection is dead. This false positive occurs because the system assumes that if a pong is not received within 5 seconds of a ping, the other side has disconnected. However, I was able to consistently reproduce scenarios where a delay of more than 5 seconds (even more than 20 seconds) was followed by a return to normal ping-pong communication without any issues. Since I can't think of any issues with increasing this number, I'm increasing it to 60s. Changelog: [General][Fixed] - Disconnections of DevTools when the network is under significant strain. Reviewed By: robhogan, huntie Differential Revision: D69523906 fbshipit-source-id: 50db1e7bbe690b42421bc226aa30fd6571ba2257
1 parent 413730e commit b097413

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/dev-middleware/src/inspector-proxy/InspectorProxy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const WS_DEBUGGER_URL = '/inspector/debug';
3939
const PAGES_LIST_JSON_URL = '/json';
4040
const PAGES_LIST_JSON_URL_2 = '/json/list';
4141
const PAGES_LIST_JSON_VERSION_URL = '/json/version';
42-
const MAX_PONG_LATENCY_MS = 5000;
42+
const MAX_PONG_LATENCY_MS = 60000;
4343
const DEBUGGER_HEARTBEAT_INTERVAL_MS = 10000;
4444

4545
const INTERNAL_ERROR_CODE = 1011;

0 commit comments

Comments
 (0)
Please sign in to comment.