Skip to content

Commit 4c34e44

Browse files
[release/10.0-preview6] Fix HttpClientHandler.CreateNativeHandler implementation (#116767)
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com> Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com> Fix #116698
1 parent 39b3b90 commit 4c34e44

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.InvokeNativeHandler.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,10 @@ private void SetCredentials(ICredentials? value)
332332

333333
private static HttpMessageHandler CreateNativeHandler()
334334
{
335-
return (HttpMessageHandler)CallNative();
335+
return CallNative(null);
336336

337337
[UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "GetHttpMessageHandler")]
338-
[return: UnsafeAccessorType(NativeHandlerType)]
339-
static extern object CallNative();
338+
static extern HttpMessageHandler CallNative([UnsafeAccessorType(GetHttpMessageHandlerType)] object? _);
340339
}
341340
}
342341
}

0 commit comments

Comments
 (0)