Skip to content

Disposable issues #150

@adamradocz

Description

@adamradocz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions