Attempt bugfix for error when on VPN (#1120)

This commit is contained in:
Imran Remtulla
2024-06-29 16:48:59 -04:00
parent 5eceaeecde
commit db413badec

View File

@@ -1770,7 +1770,9 @@ Future<void> bgUpdateCheck(String taskId, Map<String, dynamic>? params) async {
int maxRetryWaitSeconds = 5;
var netResult = await (Connectivity().checkConnectivity());
if (netResult.contains(ConnectivityResult.none)) {
if (netResult.contains(ConnectivityResult.none) ||
netResult.isEmpty ||
(netResult.contains(ConnectivityResult.vpn) && netResult.length == 1)) {
logs.add('BG update task: No network.');
return;
}