5 Commits

Author SHA1 Message Date
github-actions[bot]
c3a8c2011c chore(release): 0.4.3 2026-03-01 18:38:46 +00:00
7099853125 fix(connector.py): fix no timeout on connection error 2026-03-01 19:37:24 +01:00
github-actions[bot]
a1afd261d5 chore(release): 0.4.2 2026-03-01 17:58:09 +00:00
29ed2c8e5d fix(connector.py): do not connect multiple times when BlockingIOError encountered in Connector.connect() 2026-03-01 18:56:44 +01:00
github-actions[bot]
b8fe5d66d4 chore(release): 0.4.1 2026-02-28 23:02:09 +00:00
4 changed files with 38 additions and 4 deletions

View File

@@ -2,6 +2,24 @@
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
- [`29ed2c8`](https://gitea.pufereq.pl/judas/judas_client/commit/29ed2c8e5d256aa7b75424e6d71e14463f8b9caa) **connector.py**: do not connect multiple times when BlockingIOError encountered in `Connector.connect()`
## [0.4.1] - 2026-02-28
### Bug Fixes
- [`eb46889`](https://gitea.pufereq.pl/judas/judas_client/commit/eb4688915747e2dcff3b331618c2b0185f1b611d) **connector.py**: fix `address already in use` error
## [0.4.0] - 2026-02-28
### Features

View File

@@ -4,7 +4,7 @@ build-backend = "uv_build"
[project]
name = "judas_client"
version = "0.4.0"
version = "0.4.3"
description = "A client for judas, a remote PC fleet management system."
readme = "README.md"
authors = []

View File

@@ -145,8 +145,24 @@ class Connector:
self.socket.connect((self.host, self.port))
connected = True
except BlockingIOError:
# Connection in progress
time.sleep(0.1)
# 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...")

2
uv.lock generated
View File

@@ -275,7 +275,7 @@ wheels = [
[[package]]
name = "judas-client"
version = "0.4.0"
version = "0.4.3"
source = { editable = "." }
dependencies = [
{ name = "judas-protocol" },