Skip to content

Commit

Permalink
Make SftpClient methods show up in async stacktraces.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmds committed Apr 6, 2024
1 parent 4112504 commit d673e31
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 78 deletions.
6 changes: 3 additions & 3 deletions src/Tmds.Ssh/SftpClient.Writer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private async ValueTask ExecuteAsync(
PendingOperation? pendingOperation,
CancellationToken cancellationToken)
{
await ExecuteAsync<object?>(packet, id, pendingOperation, cancellationToken);
await ExecuteAsync<object?>(packet, id, pendingOperation, cancellationToken).ConfigureAwait(false);
}

private async ValueTask<T> ExecuteAsync<T>(
Expand Down Expand Up @@ -270,12 +270,12 @@ private async ValueTask<T> ExecuteAsync<T>(

if (typeof(T) == typeof(int))
{
int result = await new ValueTask<int>(pendingOperation, pendingOperation.Token);
int result = await new ValueTask<int>(pendingOperation, pendingOperation.Token).ConfigureAwait(false);
return (T)(object)result;
}
else
{
object? result = await new ValueTask<object?>(pendingOperation, pendingOperation.Token);
object? result = await new ValueTask<object?>(pendingOperation, pendingOperation.Token).ConfigureAwait(false);
return (T)result!;
}
}
Expand Down
Loading

0 comments on commit d673e31

Please sign in to comment.