fix_http_server_start #72

Merged
narenas merged 2 commits from fix_http_server_start into main 2026-04-29 13:30:07 +02:00
Collaborator

Fix https server

Fix https server
narenas added 2 commits 2026-04-29 13:30:00 +02:00
d585387f52 Reconnect to ogcore after connection loss
- Track registration state with _registered flag; monitoring thread
  re-sends ogagent/started when contact with ogcore is restored
- Fix AttributeError in REST client when a network-level error
  (timeout, connection refused) occurred: e.response is None for
  non-HTTP failures, so guard before accessing .status_code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fbcbbb6397 Fix do_POST sending 500 before handler runs on empty body
POST requests without a body (e.g. Reiniciar, Apagar) caused
json.loads("") to raise JSONDecodeError, which sent a 500 response
but continued executing the handler, resulting in a double response.
The client received 500 while the handler actually succeeded.

- Handle missing or zero Content-Length without attempting JSON parse
- Add return after sendJsonError to prevent calling notifyMessage after
  an error response has already been sent
narenas merged commit f50d5a1197 into main 2026-04-29 13:30:07 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: opengnsys/ogagent#72
There is no content yet.