[Modify] Polish it
This commit is contained in:
		@@ -30,6 +30,7 @@ using System;
 | 
				
			|||||||
using System.Collections;
 | 
					using System.Collections;
 | 
				
			||||||
using System.Collections.Generic;
 | 
					using System.Collections.Generic;
 | 
				
			||||||
using System.IO;
 | 
					using System.IO;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
using System.Text;
 | 
					using System.Text;
 | 
				
			||||||
using System.Threading;
 | 
					using System.Threading;
 | 
				
			||||||
using System.Timers;
 | 
					using System.Timers;
 | 
				
			||||||
@@ -132,11 +133,15 @@ namespace WebSocketSharp.Server
 | 
				
			|||||||
    /// </value>
 | 
					    /// </value>
 | 
				
			||||||
    public IEnumerable<string> IDs {
 | 
					    public IEnumerable<string> IDs {
 | 
				
			||||||
      get {
 | 
					      get {
 | 
				
			||||||
        if (_state == ServerState.ShuttingDown)
 | 
					        if (_state != ServerState.Start)
 | 
				
			||||||
          return new string[0];
 | 
					          return Enumerable.Empty<string> ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lock (_sync) {
 | 
				
			||||||
 | 
					          if (_state != ServerState.Start)
 | 
				
			||||||
 | 
					            return Enumerable.Empty<string> ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        lock (_sync)
 | 
					 | 
				
			||||||
          return _sessions.Keys.ToList ();
 | 
					          return _sessions.Keys.ToList ();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user