From 6cb1649fc237ff7425b95d1cd6b40016d509d62e Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 7 Jan 2018 21:07:06 +0900 Subject: [PATCH] fix leak --- BTCPayServer/Controllers/InvoiceController.UI.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BTCPayServer/Controllers/InvoiceController.UI.cs b/BTCPayServer/Controllers/InvoiceController.UI.cs index 3ac0faecf..3df4a45d5 100644 --- a/BTCPayServer/Controllers/InvoiceController.UI.cs +++ b/BTCPayServer/Controllers/InvoiceController.UI.cs @@ -206,9 +206,9 @@ namespace BTCPayServer.Controllers CompositeDisposable leases = new CompositeDisposable(); try { - _EventAggregator.Subscribe(async o => await NotifySocket(webSocket, o.InvoiceId, invoiceId)); - _EventAggregator.Subscribe(async o => await NotifySocket(webSocket, o.InvoiceId, invoiceId)); - _EventAggregator.Subscribe(async o => await NotifySocket(webSocket, o.InvoiceId, invoiceId)); + leases.Add(_EventAggregator.Subscribe(async o => await NotifySocket(webSocket, o.InvoiceId, invoiceId))); + leases.Add(_EventAggregator.Subscribe(async o => await NotifySocket(webSocket, o.InvoiceId, invoiceId))); + leases.Add(_EventAggregator.Subscribe(async o => await NotifySocket(webSocket, o.InvoiceId, invoiceId))); while (true) { var message = await webSocket.ReceiveAsync(DummyBuffer, default(CancellationToken));