[Modify] Polish it

master
sta 8 years ago
parent 4c8301cd9c
commit a882669fcb

@ -387,11 +387,14 @@ namespace WebSocketSharp.Server
} }
internal void Broadcast ( internal void Broadcast (
Opcode opcode, Stream stream, Dictionary <CompressionMethod, Stream> cache) Opcode opcode, Stream stream, Dictionary <CompressionMethod, Stream> cache
)
{ {
foreach (var session in Sessions) { foreach (var session in Sessions) {
if (_state != ServerState.Start) if (_state != ServerState.Start) {
_log.Error ("The service is shutting down.");
break; break;
}
session.Context.WebSocket.Send (opcode, stream, cache); session.Context.WebSocket.Send (opcode, stream, cache);
} }

Loading…
Cancel
Save