
6 Mar
2009
6 Mar
'09
9:57 a.m.
Bill Somerville
You need to call reset() on the io_service instance before you can call run() for a second time.
I tried this: while (true) // PROBLEM: reentering this loop fails - why? { io_service.reset(); boost::thread t(boost::bind(&boost::asio::io_service::run, &io_service)); [...] Now the reconnection does not succeed either and after some tries I obtain an invalid file handle error. I guess I am missing some fundamental thing with asio ... Markus