Hello,
To reproduce the issue, i have written following code.
public void Connect(string token)
{
try
{
Ews ewsConnection = new Ews();
connections.Add(ewsConnection);
ewsConnection.Connect(ServerName, ServerPort, SslMode.Implicit);
ewsConnection.Settings.Impersonation = new EwsImpersonation();
ewsConnection.Settings.Impersonation.SmtpAddress = UserName;
ewsConnection.Login(token, EwsAuthentication.OAuth20);
}
catch (Exception ex)
{
Console.WriteLine($"Exception: {ex.Message}");
}
}
I am generating OAuth access token once and calling connect method multiple times.
The connections are closed at the end once.