Skip to content

Commit

Permalink
Added automatic connection
Browse files Browse the repository at this point in the history
  • Loading branch information
jchabloz committed Jul 19, 2024
1 parent e3a50f0 commit f01dffa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/verisocks/verisocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ def connect(self, trials=None, delay=None):
delay = self.connect_delay

if not self._connected:

if self.sock is None:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.setblocking(True)
self.sock.settimeout(self._timeout)

logging.info(f"Attempting connection to {self.address}")
trial = 0
while trial < trials:
Expand Down

0 comments on commit f01dffa

Please sign in to comment.