-
-
Notifications
You must be signed in to change notification settings - Fork 74
Description
I am having an issue setting the connection timeout using this code.
The exception is raised after 21 seconds every time, regardless of the value for the ConnectionTimeout.
I have tried using await fbConn.OpenAsync() with the same results.
I am using .NETFramework 4.8 and FirebirdSql.Data.FirebirdClient 8.5.4.
DateTime dt = DateTime.Now;
try
{
FbConnection.ClearAllPools();
FbConnectionStringBuilder fbBuilder = new FbConnectionStringBuilder();
fbBuilder.DataSource = "11.11.11.11";
fbBuilder.Database = "test.fdb";
fbBuilder.ConnectionTimeout = 1;
fbBuilder.Pooling = false;
FbConnection fbConn = new FbConnection(fbBuilder.ConnectionString);
fbConn.Open();
fbConn.Close();
}
catch (Exception ex)
{
MessageBox.Show("Timeout:" + (DateTime.Now - dt).TotalSeconds + Environment.NewLine + ex.Message);
}