Compare commits
13 Commits
76ef047551
...
0.4.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6363f8591 | ||
| f065d26a5f | |||
|
0a46ac4527
|
|||
|
85553eefc5
|
|||
|
f24f7c9b08
|
|||
|
|
c3a8c2011c | ||
|
7099853125
|
|||
|
|
a1afd261d5 | ||
|
29ed2c8e5d
|
|||
|
|
b8fe5d66d4 | ||
| 4ee7a56695 | |||
|
eb46889157
|
|||
|
|
48df6e4534 |
48
CHANGELOG.md
48
CHANGELOG.md
@@ -2,6 +2,54 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.4.4] - 2026-03-05
|
||||
|
||||
### Refactor
|
||||
|
||||
- [`85553ee`](https://gitea.pufereq.pl/judas/judas_client/commit/85553eefc56e30f6d6ce40ff428fa46dc0c880fa) **connector.py**: refactor calls to Message class constructors after protocol changes
|
||||
|
||||
### Build
|
||||
|
||||
- [`0a46ac4`](https://gitea.pufereq.pl/judas/judas_client/commit/0a46ac45273d516ac061fd3ef2515281a3adb1de) **uv.lock**: update judas_protocol to 0.8.0
|
||||
- [`f24f7c9`](https://gitea.pufereq.pl/judas/judas_client/commit/f24f7c9b08624a7ce3a765fb259d6f126dec82fa) **uv.lock**: update judas_protocol to 0.7.0
|
||||
|
||||
## [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
|
||||
|
||||
- [`ac55216`](https://gitea.pufereq.pl/judas/judas_client/commit/ac5521618ba89b25fd31f09357470ed96cd405cf) **client.py**: add custom ID support with `JUDAS_ID` env variable
|
||||
- [`6486607`](https://gitea.pufereq.pl/judas/judas_client/commit/64866079d7e2087be7dd8588b22be73006605a91) **connector.py**: handle `CONTROL.CLOSE` msgs
|
||||
|
||||
### Miscellaneous Tasks
|
||||
|
||||
- [`448ffa4`](https://gitea.pufereq.pl/judas/judas_client/commit/448ffa443d0b7b464d3f70f81a0b1b3f17765484) **uv.lock**: update depedencies for Python 3.14
|
||||
|
||||
### Refactor
|
||||
|
||||
- [`11ae93e`](https://gitea.pufereq.pl/judas/judas_client/commit/11ae93ed3ceac148097f4246e53e2150a653fcf8) **client.py**: rename `Client.mac_address` -> `Client.id`
|
||||
|
||||
### Build
|
||||
|
||||
- [`2d8dc06`](https://gitea.pufereq.pl/judas/judas_client/commit/2d8dc06fa1087bb1ed968d798dc82cd0c6159e16) **uv.lock**: update judas_protocol to 0.6.0
|
||||
|
||||
## [0.3.0] - 2025-11-30
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "uv_build"
|
||||
|
||||
[project]
|
||||
name = "judas_client"
|
||||
version = "0.3.0"
|
||||
version = "0.4.4"
|
||||
description = "A client for judas, a remote PC fleet management system."
|
||||
readme = "README.md"
|
||||
authors = []
|
||||
|
||||
@@ -41,6 +41,7 @@ class Connector:
|
||||
self.socket: socket.socket = socket.socket(
|
||||
socket.AF_INET, socket.SOCK_STREAM
|
||||
)
|
||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
self.socket.setblocking(False)
|
||||
|
||||
self.selector.register(
|
||||
@@ -106,7 +107,7 @@ class Connector:
|
||||
def send_hello(self) -> None:
|
||||
"""Send a HELLO message to the server."""
|
||||
self.logger.debug("[*] Sending HELLO message...")
|
||||
hello_message: Message = Message.hello(self.mac_address)
|
||||
hello_message: Message = Message.Control.hello(self.mac_address)
|
||||
self.send(hello_message)
|
||||
|
||||
def close(self) -> None:
|
||||
@@ -144,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...")
|
||||
@@ -201,7 +218,9 @@ class Connector:
|
||||
self.on_message(message)
|
||||
|
||||
if message.ack_required:
|
||||
ack_message: Message = Message.ack(message.id)
|
||||
ack_message: Message = Message.Control.ack(
|
||||
message.id
|
||||
)
|
||||
self.send(ack_message)
|
||||
self._send_outbound()
|
||||
except Exception as e:
|
||||
|
||||
6
uv.lock
generated
6
uv.lock
generated
@@ -275,7 +275,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "judas-client"
|
||||
version = "0.3.0"
|
||||
version = "0.4.4"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "judas-protocol" },
|
||||
@@ -318,8 +318,8 @@ test = [
|
||||
|
||||
[[package]]
|
||||
name = "judas-protocol"
|
||||
version = "0.6.0"
|
||||
source = { git = "https://gitea.pufereq.pl/judas/judas_protocol.git#d16c1914ba343aed300f1c5fae0201370c3274de" }
|
||||
version = "0.8.0"
|
||||
source = { git = "https://gitea.pufereq.pl/judas/judas_protocol.git#a805ccf38edffadc1b8c8b276e60758c86516cd3" }
|
||||
|
||||
[[package]]
|
||||
name = "markdown-it-py"
|
||||
|
||||
Reference in New Issue
Block a user