Skip to content

Commit 554c209

Browse files
committed
revert back as last change is not working on pi during boot
1 parent 8c2b722 commit 554c209

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

cbpi/controller/satellite_controller.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from contextlib import AsyncExitStack, asynccontextmanager
55
from re import M
66

7-
import socket
87
import shortuuid
98
import aiomqtt
109
from cbpi import __version__
@@ -44,20 +43,6 @@ def remove_key(self, d, key):
4443
return r
4544

4645
async def init(self):
47-
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
48-
closed=True
49-
runs= 4
50-
while closed:
51-
try:
52-
runs-=1
53-
if runs<=0:
54-
logging.error("MQTT Broker not reachable, giving up.")
55-
return
56-
sock.connect((self.host, self.port))
57-
closed=False
58-
except:
59-
logging.warning("MQTT Broker not reachable, retrying ...")
60-
await asyncio.sleep(1)
6146

6247
self.client = aiomqtt.Client(
6348
self.host,

0 commit comments

Comments
 (0)