Skip to content

Commit

Permalink
Merge pull request #25 from lwoggardner/wififix
Browse files Browse the repository at this point in the history
wait 1 second after accepting connection before sending requests
  • Loading branch information
mhvis authored Apr 2, 2024
2 parents 39c2ee3 + a4d13c9 commit 3ea8ffc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samil/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ def find_inverter(self, advertisements=10, interval=5.0) -> Tuple[socket.socket,
try:
sock, addr = self.listen_sock.accept()
logger.info('Connected with inverter on address %s', addr)
# Wait before sending identification request
sleep(1.0)
return sock, addr
except socket.timeout:
pass
Expand Down

0 comments on commit 3ea8ffc

Please sign in to comment.