Add error checking for the accept call. Also add ability to shut down the server if it is blocked on accept.
Add error checking for the accept call. Also add ability to shut down the server if it is blocked on accept.

praveenster/dispatch