Resolves #444 connection fix
This commit is contained in:
parent
b84caa4cc3
commit
96fa7ece25
@ -100,7 +100,9 @@ class ConnectionManager {
|
|||||||
if (forceReconnect || !isConnected) {
|
if (forceReconnect || !isConnected) {
|
||||||
_connect().timeout(connectTimeout, onTimeout: () {
|
_connect().timeout(connectTimeout, onTimeout: () {
|
||||||
_disconnect().then((_) {
|
_disconnect().then((_) {
|
||||||
completer?.completeError(HAError("Connection timeout"));
|
if (completer != null && !completer.isCompleted) {
|
||||||
|
completer.completeError(HAError("Connection timeout"));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}).then((_) {
|
}).then((_) {
|
||||||
completer?.complete();
|
completer?.complete();
|
||||||
|
Reference in New Issue
Block a user