databento / databento-rs

The official Rust client library for Databento
https://databento.com
Apache License 2.0
41 stars 2 forks source link

Add client timeout setting #14

Closed yongqli closed 6 months ago

yongqli commented 7 months ago

Please add timeout methods to LiveClientBuilder and HistoricalClientBuilder to detect network issues.

threecgreen commented 7 months ago

Hi yongqli, Why not use tokio::time::timeout or tokio::time::timeout_at? For historical data, some endpoints will take much longer than others to return a response so it would be hard to set a good timeout value for all endpoints.