Default connection timeout value of npgsql is in seconds, but I would like to set in milliseconds since I need to have it less than 1 seconds.
p.s. I tried setting fractional(e.g. 0.5) but it doesn’t work
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From what i have been able to find out you will not be able to use a smaller measurement than a second with that provider, so you are left with few options.
1) Find another provider that allows connection timeout in less than a second.
2) Using a timer throw an exception if the connection was not established quick enough. I think you will need to use threading techniques for this to work. I found this guide ‘http://www.albahari.com/threading/’ to be very helpful for me.
3) Use connection pooling and leave a few connections already connected so you don’t have to re-establish connection.
good luck