Skip to content

Commit fbd2b52

Browse files
authored
Merge pull request #622 from mguinness/patch-1
Include error code for downstream exception handling.
2 parents 5f572f7 + 6959dce commit fbd2b52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MySqlConnector/MySql.Data.MySqlClient/MySqlConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ private async ValueTask<ServerSession> CreateSessionAsync(IOBehavior? ioBehavior
528528
}
529529
catch (OperationCanceledException ex) when (timeoutSource?.IsCancellationRequested ?? false)
530530
{
531-
throw new MySqlException("Connect Timeout expired.", ex);
531+
throw new MySqlException((int) MySqlErrorCode.UnableToConnectToHost, null, "Connect Timeout expired.", ex);
532532
}
533533
finally
534534
{

0 commit comments

Comments
 (0)