[Modify] Polish it
This commit is contained in:
parent
048e39a915
commit
20d9e24ef5
@ -400,14 +400,20 @@ namespace WebSocketSharp.Server
|
||||
}
|
||||
}
|
||||
|
||||
internal Dictionary<string, bool> Broadping (byte[] frameAsBytes, TimeSpan timeout)
|
||||
internal Dictionary<string, bool> Broadping (
|
||||
byte[] frameAsBytes, TimeSpan timeout
|
||||
)
|
||||
{
|
||||
var ret = new Dictionary<string, bool> ();
|
||||
foreach (var session in Sessions) {
|
||||
if (_state != ServerState.Start)
|
||||
break;
|
||||
|
||||
ret.Add (session.ID, session.Context.WebSocket.Ping (frameAsBytes, timeout));
|
||||
foreach (var session in Sessions) {
|
||||
if (_state != ServerState.Start) {
|
||||
_log.Error ("The service is shutting down.");
|
||||
break;
|
||||
}
|
||||
|
||||
var res = session.Context.WebSocket.Ping (frameAsBytes, timeout);
|
||||
ret.Add (session.ID, res);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user