diff options
author | Yuchen Zeng <zyc@google.com> | 2016-10-24 13:00:10 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2016-10-24 13:00:10 -0700 |
commit | d30699c7bebfa3cb0ad4ba1eac99284a52b7859f (patch) | |
tree | 32ed6c891354680361699707301273eee4c9ac54 /src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs | |
parent | 654aa869d2817a9be127f66df8cd8b18e7b760bc (diff) | |
parent | 13ca42dbae2656b97b3e40e0fa8b63aae7fd5dd5 (diff) |
Merge remote-tracking branch 'upstream/master' into reflection_header
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs')
-rw-r--r-- | src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs index 26af6311d5..b3714481eb 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs @@ -78,7 +78,10 @@ namespace Grpc.Core.Internal { var context = new AuthInterceptorContext(Marshal.PtrToStringAnsi(serviceUrlPtr), Marshal.PtrToStringAnsi(methodNamePtr)); - StartGetMetadata(context, callbackPtr, userDataPtr); + // Don't await, we are in a native callback and need to return. + #pragma warning disable 4014 + GetMetadataAsync(context, callbackPtr, userDataPtr); + #pragma warning restore 4014 } catch (Exception e) { @@ -87,7 +90,7 @@ namespace Grpc.Core.Internal } } - private async Task StartGetMetadata(AuthInterceptorContext context, IntPtr callbackPtr, IntPtr userDataPtr) + private async Task GetMetadataAsync(AuthInterceptorContext context, IntPtr callbackPtr, IntPtr userDataPtr) { try { |