WriteHandler from boost::asio::async_write doesn't work properly when connection is dropped (firewall / manual disconecting the network)
问题 I've been trying to write a client-server application using boost::asio, overall the application works great but I've stumbled over a problem regarding the data provided by 'WriteHandler' ( async_write function) when the connoction (between client <> server) is droped by a firewalll or by manualy disabling a newtwork card. Here is the code snippet: void write(const CommunicatorMessage & msg, std::function<void(bool)> writeCallback) { io_service.dispatch( [this, msg, writeCallback]() { boost: