Sfoglia il codice sorgente

Reconnect for client implemented

master
Dirk Alders 4 anni fa
parent
commit
3e6e74f976
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7
    0
      __init__.py

+ 7
- 0
__init__.py Vedi File

@@ -312,6 +312,13 @@ class tcp_client(tcp_base):
312 312
             if self.__connect_callback__ is not None:
313 313
                 self.__connect_callback__()
314 314
 
315
+    def __connection_lost__(self):
316
+        self.__socket__ = None
317
+        tcp_base.__connection_lost__(self)
318
+
319
+    def reconnect(self):
320
+        self.__connect__()
321
+
315 322
 
316 323
 class tcp_base_stp(tcp_base):
317 324
     """

Loading…
Annulla
Salva