Double check reasserting during reconnection
A forced shutdown might happen during the recovery interval (1s).
This commit is contained in:
parent
70ed2a4d83
commit
6b29c9e06c
@ -403,6 +403,12 @@ extension TunnelKitProvider: GenericSocketDelegate {
|
||||
if reasserting {
|
||||
log.debug("Disconnection is recoverable, tunnel will reconnect in \(reconnectionDelay) milliseconds...")
|
||||
tunnelQueue.schedule(after: .milliseconds(reconnectionDelay)) {
|
||||
|
||||
// give up if reasserting cleared in the meantime
|
||||
guard self.reasserting else {
|
||||
return
|
||||
}
|
||||
|
||||
self.connectTunnel(upgradedSocket: upgradedSocket, preferredAddress: socket.remoteAddress)
|
||||
}
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user