View in context in the libbitcoin Slack #general mirror.
<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.