I'm trying to detect that a peer has been disconnected using the asio socket
library.

tcp::socket::async_read_some() returns with error if the peer disconnects.