[Modify] Polish it

This commit is contained in:
sta 2017-08-26 21:33:59 +09:00
parent 4c8301cd9c
commit a882669fcb

View File

@ -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);
} }