File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Sources/ClickstreamLib/NetworkManager/Core Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,10 @@ final class DefaultRetryMechanism: Retryable {
106
106
self . persistence = persistence
107
107
self . keepAliveService = keepAliveService
108
108
109
+ self . observeNetworkConnectivity ( )
109
110
self . establishConnection ( )
110
111
self . observeDeviceStatus ( )
111
112
self . observeAppStateChanges ( )
112
- self . observeNetworkConnectivity ( )
113
113
self . keepConnectionAlive ( )
114
114
}
115
115
@@ -132,7 +132,6 @@ final class DefaultRetryMechanism: Retryable {
132
132
133
133
private func observeNetworkConnectivity( ) {
134
134
do {
135
- try reachability. startNotifier ( )
136
135
reachability. whenReachable = { [ weak self] ( _) in
137
136
guard let checkedSelf = self else { return }
138
137
checkedSelf. establishConnection ( )
@@ -141,6 +140,7 @@ final class DefaultRetryMechanism: Retryable {
141
140
guard let checkedSelf = self else { return }
142
141
checkedSelf. terminateConnection ( )
143
142
}
143
+ try reachability. startNotifier ( )
144
144
} catch {
145
145
print ( " Unable to start notifier " )
146
146
}
You can’t perform that action at this time.
0 commit comments