From 75628cdf2e9e26ace8cd62f0241446d92ad74cdc Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Thu, 4 Nov 2021 13:24:29 +0100 Subject: [PATCH] Disable reachability test (#5812) (#5813) (cherry picked from commit ec3b44498a2a3e63f071d6add998dd385e5e5a25) Co-authored-by: Elias Nahum --- ...react-native-community+netinfo+6.0.4.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 patches/@react-native-community+netinfo+6.0.4.patch diff --git a/patches/@react-native-community+netinfo+6.0.4.patch b/patches/@react-native-community+netinfo+6.0.4.patch new file mode 100644 index 000000000..8a85067e9 --- /dev/null +++ b/patches/@react-native-community+netinfo+6.0.4.patch @@ -0,0 +1,33 @@ +diff --git a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts +index ed49fb7..23dc6ae 100644 +--- a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts ++++ b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts +@@ -109,20 +109,20 @@ export default class InternetReachability { + const nextTimeoutInterval = this._isInternetReachable + ? this._configuration.reachabilityLongTimeout + : this._configuration.reachabilityShortTimeout; +- this._currentTimeoutHandle = setTimeout( +- this._checkInternetReachability, +- nextTimeoutInterval, +- ); ++ // this._currentTimeoutHandle = setTimeout( ++ // this._checkInternetReachability, ++ // nextTimeoutInterval, ++ // ); + }, + ) + .catch( + (error: Error | 'timedout' | 'canceled'): void => { + if (error !== 'canceled') { + this._setIsInternetReachable(false); +- this._currentTimeoutHandle = setTimeout( +- this._checkInternetReachability, +- this._configuration.reachabilityShortTimeout, +- ); ++ // this._currentTimeoutHandle = setTimeout( ++ // this._checkInternetReachability, ++ // this._configuration.reachabilityShortTimeout, ++ // ); + } + }, + )