Added close event for websocket connection.