BedrockFramework
BedrockFramework copied to clipboard
Disposable issues
Noticed a few potential issues:
-
ConnectionLimitMiddleware
doesn't callDispose
onSemaphoreSlim _limiter
. -
ConsumableArrayBufferWriter
should be sealed or theDispose
should bevirtual
. -
TimerAwaitable
should be sealed or theDispose
should bevirtual
. -
ConnectionContextWithDelegate
is disposing theConnectionContext connection
, although it is injected. -
SocketSender
doesn't callDispose
onSocketAsyncEventArgs _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
. -
ServerConnection
doesn't callDispose
onCancellationTokenSource _connectionClosingCts
. -
Server
doesn't callDispose
onTimerAwaitable _timerAwaitable
.