fix infinite loop triggered by stop.
Caused by swallowed exception on accept.