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

(cherry picked from commit ec9a9ff)

(CP triggered by tgolen)
  • Loading branch information
yuwenmemon authored and OSBotify committed Jan 31, 2025
1 parent 58780bd commit 81b05c3
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 81b05c3

Please sign in to comment.