We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cea3ac8 commit 49a4c40Copy full SHA for 49a4c40
websocket-sharp/Server/WebSocketSessionManager.cs
@@ -30,6 +30,7 @@
30
using System.Collections;
31
using System.Collections.Generic;
32
using System.IO;
33
+using System.Linq;
34
using System.Text;
35
using System.Threading;
36
using System.Timers;
@@ -132,11 +133,15 @@ public int Count {
132
133
/// </value>
134
public IEnumerable<string> IDs {
135
get {
- if (_state == ServerState.ShuttingDown)
136
- return new string[0];
+ if (_state != ServerState.Start)
137
+ return Enumerable.Empty<string> ();
138
+
139
+ lock (_sync) {
140
141
142
- lock (_sync)
143
return _sessions.Keys.ToList ();
144
+ }
145
}
146
147
0 commit comments