Skip to content

Usage of .Result is problematic #372

@soutchilin

Description

@soutchilin

var result = _connectionSvc.Command_WebExecuteAsync(queryString, body, method, customHeaders, contentType, string.Empty, CallerId, _disableConnectionLocking, MaxRetryCount, RetryPauseTime, cancellationToken: cancellationToken).Result;

Hi,

according to https://learn.microsoft.com/en-us/aspnet/core/fundamentals/best-practices?view=aspnetcore-3.0#avoid-blocking-calls the usage of .Result is not okay and can lead to deadlocks. Please consider to use GetAwaiter().GetResult().

Kind regards,
Alexander

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions