File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
app/src/main/java/f/cking/software/domain/interactor Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,8 @@ class DeviceServicesFetchingPlanner(
36
36
37
37
Timber .tag(TAG ).i(" Scheduling fetch service info for ${metadataNeeded.size} devices, out of ${devices.size} total" )
38
38
39
- try {
40
- fetchAllDevices(metadataNeeded)
41
- Timber .tag(TAG ).i(" All devices processed" )
42
- } catch (e: FetchDeviceServiceInfo .MaxConnectionsReached ) {
43
- Timber .e(" Max connections exceeded" )
44
- bleScannerHelper.closeAllConnections()
45
- }
39
+ fetchAllDevices(metadataNeeded)
40
+ Timber .tag(TAG ).i(" All devices processed" )
46
41
}
47
42
}
48
43
}
@@ -75,6 +70,9 @@ class DeviceServicesFetchingPlanner(
75
70
} catch (e: TimeoutCancellationException ) {
76
71
Timber .tag(TAG ).e(e, " Timeout fetching device info for ${device.address} " )
77
72
bleScannerHelper.closeDeviceConnection(device.address)
73
+ } catch (e: FetchDeviceServiceInfo .MaxConnectionsReached ) {
74
+ Timber .tag(TAG ).e(e, " Max connections reached" )
75
+ bleScannerHelper.closeAllConnections()
78
76
}
79
77
}
80
78
You can’t perform that action at this time.
0 commit comments