Nitrokey / nethsm-pkcs11

PKCS#11 module for NetHSM
Other
34 stars 10 forks source link

Fix TCP connection timeout #179

Closed sosthene-nitrokey closed 7 months ago

sosthene-nitrokey commented 7 months ago

Ureq does not use the timeout for the opening of the TCP connection, and instead uses the default timeout of 30s.

See https://github.com/algesten/ureq/issues/595#issuecomment-1904161215

ansiwen commented 7 months ago

In general it would be useful to also write what and why you do something in the change, not only giving the undelivered motivation. I can’t easily understand, why you set the connect timeout to 10 here, and how is the behavior before and after.

sosthene-nitrokey commented 7 months ago

There is a bug in ureq that cause the call to connect to always use the connect_timeout value, even when there is a custom timeout value. connect_timeout has a default of 30s, so this overrides it with the value for the global request timeout, so that we have the behaviour we expect.