Do not defer stop more than once
May cause multiple delegation and queue deadlock when a reconnection is scheduled to trigger. Fixes #106
This commit is contained in:
parent
5ea185fd75
commit
aefeb252b3
|
@ -1198,6 +1198,9 @@ public class OpenVPNSession: Session {
|
|||
}
|
||||
|
||||
private func deferStop(_ method: StopMethod, _ error: Error?) {
|
||||
guard !isStopping else {
|
||||
return
|
||||
}
|
||||
isStopping = true
|
||||
|
||||
let completion = { [weak self] in
|
||||
|
|
Loading…
Reference in New Issue