mirror of https://github.com/quasar/Quasar.git
Added null-check for list of clients
This commit is contained in:
parent
69481ed813
commit
e9fdb1a431
|
@ -400,15 +400,18 @@ namespace xServer.Core.Networking
|
|||
|
||||
lock (_clientsLock)
|
||||
{
|
||||
while (_clients.Count != 0)
|
||||
if (_clients != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
_clients[0].Disconnect();
|
||||
_clients.RemoveAt(0);
|
||||
}
|
||||
catch
|
||||
while (_clients.Count != 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
_clients[0].Disconnect();
|
||||
_clients.RemoveAt(0);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue