diff --git a/websocket-sharp/Server/WebSocketSessionManager.cs b/websocket-sharp/Server/WebSocketSessionManager.cs index eadee9af..29a12611 100644 --- a/websocket-sharp/Server/WebSocketSessionManager.cs +++ b/websocket-sharp/Server/WebSocketSessionManager.cs @@ -363,11 +363,14 @@ namespace WebSocketSharp.Server } internal void Broadcast ( - Opcode opcode, byte[] data, Dictionary cache) + Opcode opcode, byte[] data, Dictionary cache + ) { foreach (var session in Sessions) { - if (_state != ServerState.Start) + if (_state != ServerState.Start) { + _log.Error ("The service is shutting down."); break; + } session.Context.WebSocket.Send (opcode, data, cache); }