
I have a Windows application that uses ASIO to implement a server that listens on a TCP port. When I run it from the console it starts and operates without error. When I start the same application as a Windows service (it's written to be run either way) my call to boost::asio::ip::tcp::acceptor::async_accept() immediately calls the passed accept handler to report error 995: "The I/O operation has been aborted because of either a thread exit or an application request". This occurs even when I run the service under the same account as the logged-in user. I know I'm a bit sketchy with the details of my implementation, but I think this is at least as likely to be some Windows weirdness as an ASIO problem per se. I'm hoping someone else has encountered and fixed this problem before. Thanks. -evan