Kill threads when websocket connection gets closed