-fix error handler
-closed connection fires quit handler