stuff now works

pull/19792/head
Jan Tattermusch 5 years ago
parent 8ad2b146ed
commit 70c7aa1623
  1. 6
      src/csharp/Grpc.Core/Internal/CallSafeHandle.cs
  2. 2
      src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs

@ -132,6 +132,12 @@ namespace Grpc.Core.Internal
SliceBufferSafeHandle optionalPayload, WriteFlags writeFlags)
{
// TODO: optionalPayload == null -> pass null SliceBufferSafeHandle
// do this properly
if (optionalPayload == null)
{
optionalPayload = SliceBufferSafeHandle.NullInstance;
}
using (completionQueue.NewScope())
{
var ctx = completionQueue.CompletionRegistry.RegisterBatchCompletion(CompletionHandler_ISendStatusFromServerCompletionCallback, callback);

@ -32,6 +32,8 @@ namespace Grpc.Core.Internal
static readonly NativeMethods Native = NativeMethods.Get();
static readonly ILogger Logger = GrpcEnvironment.Logger.ForType<SliceBufferSafeHandle>();
public static readonly SliceBufferSafeHandle NullInstance = new SliceBufferSafeHandle();
private IntPtr tailSpacePtr;
private UIntPtr tailSpaceLen;

Loading…
Cancel
Save