mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 19:58:57 +08:00
Dispose the AsyncSignalWaiter before setting it to null (#1586)
dispose the AsyncSignalWaiter before setting it to null to prevent memory leak Co-authored-by: Mario Zelger <mario.zelger@confer.ch>
This commit is contained in:
co-authored by
Mario Zelger
parent
a5e1a4d6dd
commit
c45cb8b04e
@@ -39,6 +39,7 @@ namespace MQTTnet.Internal
|
|||||||
if (_waiter != null)
|
if (_waiter != null)
|
||||||
{
|
{
|
||||||
_waiter.Approve();
|
_waiter.Approve();
|
||||||
|
_waiter.Dispose();
|
||||||
_waiter = null;
|
_waiter = null;
|
||||||
|
|
||||||
// Since we already got a waiter the signal must be reset right now!
|
// Since we already got a waiter the signal must be reset right now!
|
||||||
|
|||||||
Reference in New Issue
Block a user