port some changes made to improve stability for ZnMultiThreadedServer (i.e., error handling)