Endpoint no longer crash when a socket is properly closed.