Skip to content

Commit 4995d42

Browse files
committed
remove code in sattelite controller
1 parent f10c288 commit 4995d42

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

cbpi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "4.7.1.a1"
1+
__version__ = "4.7.1.a2"
22
__codename__ = "Winter Bock"

cbpi/controller/satellite_controller.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import logging
44
from contextlib import AsyncExitStack, asynccontextmanager
55
from re import M
6-
import socket
76

87
import shortuuid
98
import aiomqtt
@@ -43,19 +42,7 @@ def remove_key(self, d, key):
4342
del r[key]
4443
return r
4544

46-
def is_port_open(self, host, port):
47-
"""Check if a specific port on a host is open."""
48-
try:
49-
with socket.create_connection((host, port), timeout=5):
50-
return True
51-
except (socket.timeout, socket.error):
52-
return False
53-
5445
async def init(self):
55-
# Check if the host and port are open before proceeding
56-
if not self.is_port_open(self.host, self.port):
57-
self.logger.error(f"Cannot connect to {self.host}:{self.port}. Ensure the host and port are accessible.")
58-
return
5946

6047
self.client = aiomqtt.Client(
6148
self.host,

0 commit comments

Comments
 (0)