-
Notifications
You must be signed in to change notification settings - Fork 344
Closed
Description
Software versions
MySqlConnector version: 2.4.0
Server type (MySQL, MariaDB, Aurora, etc.) and version:
.NET version: 8.0
Describe the bug
If connecting is canceled during TLS negotiation, MySqlConnector may log a spurious error: ERROR Session 1.1 couldn't initialize TLS connection
Exception
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at async Task System.Net.Security.SslStream.ForceAuthenticationAsync<TIOAdapter>(bool receiveFirst, byte[] reAuthenticationData, CancellationToken cancellationToken)
at async Task MySqlConnector.Core.ServerSession.InitSslAsync(ProtocolCapabilities serverCapabilities, ConnectionSettings cs, MySqlConnection connection, SslProtocols sslProtocols, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 1691
Expected behavior
Should be logged at Debug level at most.
Additional context
Don't log for OperationCanceledException
here: https://github.com/mysql-net/MySqlConnector/blob/2.4.0/src/MySqlConnector/Core/ServerSession.cs#L1731-L1733
ejball
Metadata
Metadata
Assignees
Labels
No labels