Bitcoin full node and query server

Dec 12, 2025

View in context in the libbitcoin Slack #general mirror.

evoskuil08:54
The caller disconnect scenario was not handled, but the process close scenario was. This is because on a process close the socket is terminated by the stop handler, which is ultimately invoked by the <ctrl-c> event handler. But the caller disconnect is a per-channel signal that comes from the socket, and is only picked up by an async read handler being invoked. But while we are handling a call, there is no read handler pending. We resubscribe to the channel upon call completion. So even though the work is off strand, there was nothing to capture the close until the call completed. I resolved this by creating an async_wait method on the socket, which will pick up termination. The challenge was cleanly registering and deregistering this before and after the potentially long-running calls. That's all done and working now.