Skip to content

Commit

Permalink
Add socket timeout of 3 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
giselaortt committed Oct 23, 2024
1 parent a01c7d9 commit 4814471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chargebyte/chargebyte_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ChargebyteBoard:
def __init__(self, host: str, port: int):
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.socket.connect((host, port))
self.socket.settimeout(15.0)
self.socket.settimeout(3.0)
self.mutex = Lock()

def send_packet(self, service_id: int, payload: bytearray) -> None:
Expand Down

0 comments on commit 4814471

Please sign in to comment.