mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Added try/catch to DLive
This commit is contained in:
@@ -45,7 +45,17 @@ public class DLive(ChatBot kfChatBot) : IDisposable
|
||||
continue;
|
||||
}
|
||||
|
||||
var status = await IsLive(username, ct);
|
||||
DLiveIsLiveModel status;
|
||||
try
|
||||
{
|
||||
status = await IsLive(username, ct);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.Error($"Caught an exception while retrieving live status for {username}");
|
||||
_logger.Error(e);
|
||||
continue;
|
||||
}
|
||||
if (!status.IsLive)
|
||||
{
|
||||
currentlyLive.Remove(username);
|
||||
|
||||
Reference in New Issue
Block a user