influxdb-csharp icon indicating copy to clipboard operation
influxdb-csharp copied to clipboard

BlockingCall detected in HttpLineProtocolEmitter.cs

Open Chris8er opened this issue 5 years ago • 1 comments

We're using https://github.com/benaadams/Ben.BlockingDetector to detect blocking calls inside our application. We get the following warning:

Blocking method has been invoked and blocked, this can lead to threadpool starvation. " at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at InfluxDB.Collector.Pipeline.Emit.HttpLineProtocolEmitter.Emit(PointData[] points)

Accessing _client.WriteAsync(payload).Result; is not a good practice. Is this an issue and will it be addressed in the near future?

Chris8er avatar Mar 23 '20 11:03 Chris8er

@Chris8er thanks! we will take a look.

russorat avatar Mar 31 '20 17:03 russorat