Describe the bug
After updating to newest 2.1.0.3 NuGet package i observe two Authenticated events instead of one.
Previous version was 2.0.4.
To Reproduce
I hope this code excerpt will help (original code has additional logging and multiple cancellation token checks):
imapClient = new ImapClient();
imapClient.Connected += onClientConnected;
imapClient.Authenticated += onClientAuthenticated;
imapClient.Disconnected += onClientDisconnected;
imapClient.Connect(uri, ct);
...
private void onClientConnected(object sender, EventArgs e)
{
logger.Info("Connected with: " + uri);
imapClient.AuthenticationMechanisms.Remove("XOAUTH2");
imapClient.Authenticate(credentials, ct);
}
private void onClientAuthenticated(object sender, AuthenticatedEventArgs e)
{
logger.Debug("Authenticated to: " + uri);
// Some after auth code
}
Expected behavior
My onClientAuthenticated method should be called once, but is twice.
Screenshots
NET Framework 4.6, Windows 2008 R2
From my application log:
[2018-12-10 16:08:22.4837] Info EmailWatcherElement.onClientConnected: Connected with: ...
[2018-12-10 16:08:22.9710] Debug EmailWatcherElement.onClientAuthenticated: Authenticated to: ...
[2018-12-10 16:08:23.0003] Debug EmailWatcherElement.onClientAuthenticated: Detected trash: Trash
[2018-12-10 16:08:23.0169] Debug EmailWatcherElement.onClientAuthenticated: Authenticated to: ...
[2018-12-10 16:08:23.0169] Debug EmailWatcherElement.onClientAuthenticated: Detected trash: Trash
Describe the bug
After updating to newest 2.1.0.3 NuGet package i observe two Authenticated events instead of one.
Previous version was 2.0.4.
To Reproduce
I hope this code excerpt will help (original code has additional logging and multiple cancellation token checks):
Expected behavior
My
onClientAuthenticatedmethod should be called once, but is twice.Screenshots
NET Framework 4.6, Windows 2008 R2
From my application log: