Improved Buffer Manager

This commit is contained in:
MaxXor 2015-06-06 09:28:43 +02:00
parent b0d68c851d
commit 3abc4c5f82
2 changed files with 3 additions and 3 deletions

View File

@ -42,9 +42,6 @@ private void OnClientState(bool connected)
ClientState(this, connected);
}
if (connected && Server.BufferManager.BuffersAvailable == 0)
Server.BufferManager.IncreaseBufferCount(1);
if (!connected && !_parentServer.Processing)
_parentServer.RemoveClient(this);
}

View File

@ -322,6 +322,9 @@ private void Process(object s, SocketAsyncEventArgs e)
client.ClientRead += OnClientRead;
client.ClientWrite += OnClientWrite;
if (BufferManager.BuffersAvailable == 0)
BufferManager.IncreaseBufferCount(1);
OnClientState(client, true);
}