1 Commits
Author SHA1 Message Date
lotherk a00534cf6c serve: a second client is told why, not left hanging
`--serve` holds one engine, so one client talks to it at a time - that part is
deliberate. What was not: the second client connected into the listen backlog
and then waited for a greeting that could not come until the first one left.
splinterctl printed nothing and hung; --attach gave up 10 s later with "no
greeting from the backend", which names the wrong cause.

The accept is non-blocking now and a client that arrives while the engine is
taken is answered at once: an error event with the reason, then a shutdown of
the write side. That reads on the other end as "another client is attached:
one conversation runs one turn at a time". Descriptors are drained before the
close, or the RST would eat the message the client has not read yet.

Two smaller ones on the same path:
- --attach reconnects on a broken connection; it now carries the server's error
  text through instead of replacing it with "no greeting".
- a client that reads nothing is not waited for forever: a greeting timeout
  turns a silent server into a message instead of a hang.
2026-11-22 10:26:06 +00:00