//called via SignalR public Task ClientStopCrawl() { TriggerCrawlWithSignalRConnection.StopCrawl(this.Context.ConnectionId); TriggerCrawlWithSignalRConnection.crawlerList.Remove(this.Context.ConnectionId); return(null); }
//cleanup on disconnect public override async Task OnDisconnectedAsync(Exception exception) { TriggerCrawlWithSignalRConnection.StopCrawl(this.Context.ConnectionId); TriggerCrawlWithSignalRConnection.crawlerList.Remove(this.Context.ConnectionId); await base.OnDisconnectedAsync(exception); }