-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the ability to override the connect and read timeouts #143
Comments
Hi @heidiwags. This was fixed as part of #144. Before building the PlaidClient you can get access to the underlying OkHttpClientBuilder and set the timeouts as you wish. |
Thanks! Just so that I'm implementing correctly - this is what i have for the sandbox: Also - 300s = 5 minutes for the default - are there suggestions for more reasonable read timeouts than 5 minutes? 2.5m still feels long as well - but I'm not sure what the average plaid request takes (we use the API to generate the dwolla token, balance check, generate the access token, and generate the public token |
@heidiwags , the read and connect timeouts are a bit misleading-ly named. The read timeout is the maximum amount of time between successive reads. The connect timeout is similarly a socket-level timeout. I would set these on the order of seconds, as it limits how long okhttp will wait on socket connect and how long successive reads on the same socket can take to succeed. It does not set a maximum duration for a request. |
Currently there is no way to override the read and connect timeout.
I think the builder should be changed to allow passing in a custom configuration, rather than having it default to 300s and 5s.
The text was updated successfully, but these errors were encountered: