Skip to content

Commit 373c118

Browse files
authored
Fix issue #321
Fixes #321 Add delay before returning port availability status
1 parent 39eacc6 commit 373c118

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • custom_components/sunspec

custom_components/sunspec/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def check_port(self) -> bool:
177177
f"Check_Port (ERROR): port not available on {self._host}:{self._port} - error: {sock_res}"
178178
)
179179
sock.close()
180+
time.sleep(0.1)
180181
return is_open
181182

182183
def modbus_connect(self, config=None):

0 commit comments

Comments
 (0)