Skip to content

I cannot set ConnectionTimeout to be less than 21 seconds #1029

@bogdan-soare

Description

@bogdan-soare

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);
}

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions