Prevent NRE on NBxplorer listener

This commit is contained in:
nicolas.dorier 2019-11-21 14:27:57 +09:00
parent 2b9f390c64
commit b915544798
No known key found for this signature in database
GPG key ID: 6618763EF09186FE

View file

@ -384,6 +384,8 @@ namespace BTCPayServer.Payments.Bitcoin
return invoice;
}
public async Task StopAsync(CancellationToken cancellationToken)
{
if (_Cts != null)
{
leases.Dispose();
_Cts.Cancel();
@ -391,4 +393,5 @@ namespace BTCPayServer.Payments.Bitcoin
Logs.PayServer.LogInformation($"{this.GetType().Name} successfully exited...");
}
}
}
}