Skip to content

Commit

Permalink
wait 1 second after accepting connection before sending requests
Browse files Browse the repository at this point in the history
  • Loading branch information
lwoggardner authored Mar 31, 2024
1 parent 39c2ee3 commit a4d13c9
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 a4d13c9

Please sign in to comment.