Skip to content

Commit

Permalink
Merge pull request #56183 from Expensify/tgolen-disable-pingpongoffline
Browse files Browse the repository at this point in the history
[No QA] [CP Staging] Disable the network going offline for now when a PONG is not received
  • Loading branch information
yuwenmemon authored Jan 31, 2025
2 parents 1bb4e5b + 84e45dc commit ec9a9ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ function checkforMissingPongEvents() {
// If the oldest timestamp is older than 2 * PING_INTERVAL_LENGTH_IN_SECONDS, then set the network status to offline
if (ageOfEventInMS > NO_EVENT_RECEIVED_TO_BE_OFFLINE_THRESHOLD_IN_SECONDS * 1000) {
Log.info(`[Pusher PINGPONG] The server has not replied to the PING event ${eventID} in ${ageOfEventInMS} ms so going offline`);
NetworkConnection.setOfflineStatus(true, 'The client never got a Pusher PONG event after sending a Pusher PING event');
// NetworkConnection.setOfflineStatus(true, 'The client never got a Pusher PONG event after sending a Pusher PING event');

// When going offline, reset the pingpong state so that when the network reconnects, the client will start fresh
lastTimestamp = Date.now();
Expand Down

0 comments on commit ec9a9ff

Please sign in to comment.