Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3a8c2011c | ||
|
7099853125
|
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.4.3] - 2026-03-01
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`7099853`](https://gitea.pufereq.pl/judas/judas_client/commit/709985312514f866b760610fe7d8374763d188b2) **connector.py**: fix no timeout on connection error
|
||||
|
||||
## [0.4.2] - 2026-03-01
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "uv_build"
|
||||
|
||||
[project]
|
||||
name = "judas_client"
|
||||
version = "0.4.2"
|
||||
version = "0.4.3"
|
||||
description = "A client for judas, a remote PC fleet management system."
|
||||
readme = "README.md"
|
||||
authors = []
|
||||
|
||||
@@ -145,8 +145,24 @@ class Connector:
|
||||
self.socket.connect((self.host, self.port))
|
||||
connected = True
|
||||
except BlockingIOError:
|
||||
# connection in progress
|
||||
# connection in progress, wait for socket to become writable
|
||||
self.logger.debug(
|
||||
"[.] Connection in progress, waiting for completion..."
|
||||
)
|
||||
events = self.selector.select(timeout=1)
|
||||
for _, mask in events:
|
||||
if mask & selectors.EVENT_WRITE:
|
||||
err = self.socket.getsockopt(
|
||||
socket.SOL_SOCKET, socket.SO_ERROR
|
||||
)
|
||||
if err == 0:
|
||||
connected = True
|
||||
else:
|
||||
self.logger.error(
|
||||
f"[!] Connection failed with error code: {err}"
|
||||
)
|
||||
if not connected:
|
||||
continue
|
||||
except socket.error as e:
|
||||
self.logger.error(f"[!] Connection error: {e}")
|
||||
self.logger.debug(f"[.] Retrying in {delay} seconds...")
|
||||
|
||||
Reference in New Issue
Block a user