diff --git a/NostrStreamer/Controllers/SRSController.cs b/NostrStreamer/Controllers/SRSController.cs index 92222d4..41f291c 100644 --- a/NostrStreamer/Controllers/SRSController.cs +++ b/NostrStreamer/Controllers/SRSController.cs @@ -99,7 +99,7 @@ public class SrsController : Controller } catch (Exception ex) { - _logger.LogWarning("Failed to start stream: {message}", ex.Message); + _logger.LogWarning("Failed to process stream: {message}", ex.Message); } return new() diff --git a/NostrStreamer/Services/StreamManager/NostrStreamManager.cs b/NostrStreamer/Services/StreamManager/NostrStreamManager.cs index 1a4b74d..4060380 100644 --- a/NostrStreamer/Services/StreamManager/NostrStreamManager.cs +++ b/NostrStreamer/Services/StreamManager/NostrStreamManager.cs @@ -166,13 +166,15 @@ public class NostrStreamManager : IStreamManager _eventBuilder.BroadcastEvent(chat); } - if (_context.User.Balance <= 0) + if (_context.User.Balance <= 0 || _context.User.IsBlocked) { _logger.LogInformation("Kicking stream due to low balance"); if (!string.IsNullOrEmpty(_context.UserStream.ForwardClientId)) { await _context.EdgeApi.KickClient(_context.UserStream.ForwardClientId); } + + throw new Exception("User balance too low or user is blocked"); } }