Handle the excpetion that is raised when the server breaks the connection