A. did you forget to have an async_read_some active?B. did your io_service stop because you forgot to give it asio::io_service::work?
C. did you call shutdown() or close() on the underlying protocol?
D. What is the exact error_code.value(), .category() and .message()?
once io_service::run() returns, the io_service will be in the stopped() state. This happens when there are no remaining async operations waiting to complete on it. In a multi-threaded environment you must keep the io_service running by creating an io_service::work object against it. Then when you want to stop your communications loop, you would call op_service::stop() and join the threads.
Can you post a minimal complete example somewhere which demonstrates the problem?
R