Boost logo

Boost Users :

Subject: [Boost-users] [asio] Error running as Windows service; runs fine from console
From: Evan Burkitt (eburkitt_at_[hidden])
Date: 2010-09-15 00:10:03


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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net