fix infinite loop triggered by stop.
Caused by swallowed exception on accept.
Merge pull request #13 from wbstr/master

fix infinite loop triggered by stop.