diff --git a/Source/CocoaMQTT.swift b/Source/CocoaMQTT.swift index cb462c37..e7bbdb3f 100644 --- a/Source/CocoaMQTT.swift +++ b/Source/CocoaMQTT.swift @@ -612,6 +612,7 @@ extension CocoaMQTT: CocoaMQTTSocketDelegate { didDisconnect(self, err) guard !is_internal_disconnected else { + is_internal_disconnected = false return } diff --git a/Source/CocoaMQTT5.swift b/Source/CocoaMQTT5.swift index f8fb01f0..50d11a6b 100644 --- a/Source/CocoaMQTT5.swift +++ b/Source/CocoaMQTT5.swift @@ -669,6 +669,7 @@ extension CocoaMQTT5: CocoaMQTTSocketDelegate { didDisconnect(self, err) guard !is_internal_disconnected else { + is_internal_disconnected = false return }