The AutoUpdate method in StreamingHueClient creates an internal Task, which is never awaited. As the call to Send inside of it can, under some circumstances, throw an exception (e.g. after calling Close), it's possible to get an unobserved task exception from TaskScheduler.UnobservedTaskException.
Would it be possible to return the internal Task object from AutoUpdate, so it can be awaited and any exceptions observed?
The
AutoUpdate
method in StreamingHueClient creates an internalTask
, which is never awaited. As the call toSend
inside of it can, under some circumstances, throw an exception (e.g. after callingClose
), it's possible to get an unobserved task exception fromTaskScheduler.UnobservedTaskException
.Would it be possible to return the internal
Task
object fromAutoUpdate
, so it can be awaited and any exceptions observed?https://github.com/Q42/Q42.HueApi/blob/d911b75fd40ad44a65b920b085a7a7482064199f/src/Q42.HueApi.Streaming/StreamingHueClient.cs#L100