@@ -415,18 +415,20 @@ namespace WebSocketSharp.Net
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    private void cleanupConnections ()
 | 
					    private void cleanupConnections ()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					      HttpConnection[] conns = null;
 | 
				
			||||||
      lock (_connectionsSync) {
 | 
					      lock (_connectionsSync) {
 | 
				
			||||||
        if (_connections.Count == 0)
 | 
					        if (_connections.Count == 0)
 | 
				
			||||||
          return;
 | 
					          return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Need to copy this since closing will call the RemoveConnection method.
 | 
					        // Need to copy this since closing will call the RemoveConnection method.
 | 
				
			||||||
        var keys = _connections.Keys;
 | 
					        var keys = _connections.Keys;
 | 
				
			||||||
        var conns = new HttpConnection[keys.Count];
 | 
					        conns = new HttpConnection[keys.Count];
 | 
				
			||||||
        keys.CopyTo (conns, 0);
 | 
					        keys.CopyTo (conns, 0);
 | 
				
			||||||
        _connections.Clear ();
 | 
					        _connections.Clear ();
 | 
				
			||||||
        for (var i = conns.Length - 1; i >= 0; i--)
 | 
					 | 
				
			||||||
          conns[i].Close (true);
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      for (var i = conns.Length - 1; i >= 0; i--)
 | 
				
			||||||
 | 
					        conns[i].Close (true);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void cleanupContextRegistry ()
 | 
					    private void cleanupContextRegistry ()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user