Noticed a few potential issues:
ConnectionLimitMiddleware doesn't call Dispose on SemaphoreSlim _limiter.
ConsumableArrayBufferWriter should be sealed or the Dispose should be virtual.
TimerAwaitable should be sealed or the Dispose should be virtual.
ConnectionContextWithDelegate is disposing the ConnectionContext connection, although it is injected.
SocketSender doesn't call Dispose on SocketAsyncEventArgs _eventArgs. Plus, the _eventArgs.Completed += (_, e) => ((SocketAwaitable)e.UserToken).Complete(e.BytesTransferred, e.SocketError); not a memory leak, as it never unsubscribed? This is the same with the SocketReceiver.
ServerConnection doesn't call Dispose on CancellationTokenSource _connectionClosingCts.
Server doesn't call Dispose on TimerAwaitable _timerAwaitable.
Noticed a few potential issues:
ConnectionLimitMiddlewaredoesn't callDisposeonSemaphoreSlim _limiter.ConsumableArrayBufferWritershould be sealed or theDisposeshould bevirtual.TimerAwaitableshould be sealed or theDisposeshould bevirtual.ConnectionContextWithDelegateis disposing theConnectionContext connection, although it is injected.SocketSenderdoesn't callDisposeonSocketAsyncEventArgs _eventArgs. Plus, the_eventArgs.Completed += (_, e) => ((SocketAwaitable)e.UserToken).Complete(e.BytesTransferred, e.SocketError);not a memory leak, as it never unsubscribed? This is the same with theSocketReceiver.ServerConnectiondoesn't callDisposeonCancellationTokenSource _connectionClosingCts.Serverdoesn't callDisposeonTimerAwaitable _timerAwaitable.