diff --git a/Arkane.Zeroconf/Providers/Bonjour/ServiceBrowser.cs b/Arkane.Zeroconf/Providers/Bonjour/ServiceBrowser.cs index 850504d..847429e 100644 --- a/Arkane.Zeroconf/Providers/Bonjour/ServiceBrowser.cs +++ b/Arkane.Zeroconf/Providers/Bonjour/ServiceBrowser.cs @@ -10,6 +10,7 @@ using System ; using System.Collections ; using System.Collections.Generic ; +using System.Diagnostics ; using System.Threading.Tasks ; #endregion @@ -79,7 +80,15 @@ private void Start (bool async) throw new InvalidOperationException ("ServiceBrowser is already started") ; if (async) - this.task = Task.Run (() => this.ProcessStart ()).ContinueWith (_ => this.task = null) ; + this.task = Task.Run (() => this.ProcessStart ()).ContinueWith (_ => + { + this.task = null ; + if (_.IsFaulted) + { + Debug.Assert (_.Exception != null, "_.Exception != null") ; + throw _.Exception ; + } + }) ; else this.ProcessStart () ; }