Repository navigation
Commit 22fc771
fix: don't reconnect after a command longer than the ack timeout
The daemon handles each message inline, so while a command runs its serve
loop reads nothing and the controller's heartbeat acks sit unread in the
socket. When the command finished, the next ack_check saw no ack for longer
than ack_timeout (30s by default) and reconnected, so the daemon vanished
from the registry for its 5s backoff right after answering.
This broke the E2E run on #44: `microdnf install -y curl` on rocky took
the full 60s timeout, daemon-rocky-1 reconnected the same instant, and the
following tests failed with "Daemon daemon-rocky-1 not found".
Restart the ack deadline after each inline message. The buffered acks are
read on the next iterations; a controller that really stopped acking is
still caught one ack_timeout later. Introduced in #40.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>1 parent c400a41 commit 22fc771
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
281 | 298 | | |
282 | 299 | | |
283 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
623 | 632 | | |
624 | 633 | | |
625 | 634 | | |
| |||
0 commit comments