Gaurd against asyncore loop start/stop race condition

If the loop stopped while a new connection was being set up,
it could result in the application hanging.