I have a deadline_timer object that fires every second to perform network house keeping tasks. I am having what looks like a race condition or runaway IO when my timer fires and performs an async_connect.
parent_connection::tick
parent_connection::connect: trying next address:port 10.0.1.198:4315
Press any key to continue...
CONNECTING ===> 10.0.1.198
CONNECT FAILED: Connection refused
00:00:01.001559
parent_connection_manager::disconnected
parent_connection::connect: trying next address:port 10.0.1.198:4316
CONNECTING ===> 10.0.1.198
CONNECT FAILED: Invalid argument
00:00:01.002813
parent_connection_manager::disconnected
parent_connection::connect: trying next address:port 10.0.1.198:4317
CONNECTING ===> 10.0.1.198
CONNECT FAILED: Invalid argument
00:00:01.000404
parent_connection_manager::disconnected
parent_connection::connect: trying next address:port 10.0.1.198:4318
CONNECTING ===> 10.0.1.198
CONNECT FAILED: Invalid argument
00:00:01.000449
parent_connection_manager::disconnected
parent_connection::connect: trying next address:port 10.0.1.198:4319
CONNECTING ===> 10.0.1.198
CONNECT FAILED: Invalid argument
* Note the first call succeeds because it was not called from with a timer.
So I guess the question is "How can I call async sockets on the same io_service trough a timer?"