You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Kiota default handlers are created every time, so they get a new instance per client. But these 3 static handlers are re-used for every client, which results in the _operationStarted = true being set on the handler the first time any client has issued a request.
When ChainHandlersCollectionAndGetFirstLink is called, it attempts to set the InnerHandler on each handler in the chain:
This results in an exception, when trying to set the InnerHandler:
The exception is:
System.InvalidOperationException: This instance has already started one or more requests. Properties can only be modified before sending the first request.
at System.Net.Http.DelegatingHandler.CheckDisposedOrStarted()
at System.Net.Http.DelegatingHandler.set_InnerHandler(HttpMessageHandler value)
at GitHub.Octokit.Client.ClientFactory.ChainHandlersCollectionAndGetFirstLink(HttpMessageHandler finalHandler, DelegatingHandler[] handlers)
at GitHub.Octokit.Client.ClientFactory.Build()
The text was updated successfully, but these errors were encountered:
The static handlers here are causing any call to
ClientFactory.Build()
to fail after a request on a previous built client has been issued:source-generator/stage/dotnet/dotnet-sdk/src/Client/ClientFactory.cs
Lines 20 to 26 in fcf6805
The Kiota default handlers are created every time, so they get a new instance per client. But these 3 static handlers are re-used for every client, which results in the
_operationStarted = true
being set on the handler the first time any client has issued a request.When
ChainHandlersCollectionAndGetFirstLink
is called, it attempts to set theInnerHandler
on each handler in the chain:This results in an exception, when trying to set the InnerHandler:
The exception is:
The text was updated successfully, but these errors were encountered: