diff --git a/src/net45/WampSharp/WAMP2/V2/Api/Rx/WampClientSubject.cs b/src/net45/WampSharp/WAMP2/V2/Api/Rx/WampClientSubject.cs index 296b202e7..5bb03d9aa 100644 --- a/src/net45/WampSharp/WAMP2/V2/Api/Rx/WampClientSubject.cs +++ b/src/net45/WampSharp/WAMP2/V2/Api/Rx/WampClientSubject.cs @@ -98,7 +98,16 @@ public void Dispose() (mDisposableTask.Exception == null)) { IAsyncDisposable result = mDisposableTask.Result; - result.DisposeAsync(); + result.DisposeAsync().ContinueWith(x => + { + if (x.Exception != null) + { + // Done in order to avoid .NET 4.0 UnhandledException + // Nobody sees this exception anyway. I hope that we + // soon get a version of Reactive Extensions which is more + // suited for remote pub/sub, and allows to return AsyncDispoables. + } + }); } } }