private void OnSessionDestroyed(Object sender, IoSessionEventArgs e) { AsyncSocketSession s = e.Session as AsyncSocketSession; if (s != null && _readWritePool != null) { _readWritePool.Push(s.ReadBuffer); _readWritePool.Push(s.WriteBuffer); } }
private void OnSessionDestroyed(Object sender, IoSessionEventArgs e) { Semaphore pool = _connectionPool; if (pool != null) pool.Release(); }