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
{{ message }}
Repository navigation
Service Client is not reusing an existing connection #306
It seems like every time a new ServiceClient is returning a new connection (re-login to D365), although we have passed RequireNewInstance=false in the connection string, which uses client and secret.
It doesn't happen in the old .Net SDK. Below are traces for the different queries initiated from a Function App (different sessions and different method calls).
kwu022 , we have identified a bug in this behavior that would cause this pattern fault if the previous connection was disposed. We are going to move to a newer pattern for this:
if a connection is created to an instance with use unique = false, then disposed.
then the next connection contains use unique = false, will run the 'restart' behavior to connect to the instance,
if a connection is created to an instance with use unique = false,
then the next connection contains use unique = false, we will reuse the settings from the first connection.
Note, this default behavior for use unique is 'true'.
Activity
MattB-msft commentedon Aug 21, 2022
Thanks for your report,
We will take a look at this.
MattB-msft commentedon Feb 14, 2023
kwu022 , we have identified a bug in this behavior that would cause this pattern fault if the previous connection was disposed. We are going to move to a newer pattern for this:
if a connection is created to an instance with use unique = false, then disposed.
then the next connection contains use unique = false, will run the 'restart' behavior to connect to the instance,
if a connection is created to an instance with use unique = false,
then the next connection contains use unique = false, we will reuse the settings from the first connection.
Note, this default behavior for use unique is 'true'.