The server handles commands in order and holds back everything sent
after a lost one, so giving up on a command now ends the connection, as
in the official client. A connection lost without either side saying
goodbye (a timeout, or such a command) is now reported to listeners as
a disconnect ("connection lost").
- A command's acknowledgement is awaited in the background: ensureSent
is often called from the packet handler thread, which must keep
handling while resends go on. A command that fails makes way for the
next one.
- One packet that fails to handle no longer ends the handler thread,
which left everything after it unhandled while ACKs and pings kept the
connection looking alive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>