File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -170,12 +170,16 @@ impl HTTPFetcherBuilder {
170
170
}
171
171
172
172
pub fn request_timeout ( mut self , request_timeout : Duration ) -> Self {
173
- self . request_timeout = Some ( request_timeout) ;
173
+ if request_timeout. as_secs ( ) > 0 {
174
+ self . request_timeout = Some ( request_timeout) ;
175
+ }
174
176
self
175
177
}
176
178
177
179
pub fn update_interval ( mut self , update_interval : Duration ) -> Self {
178
- self . update_interval = update_interval;
180
+ if update_interval. as_secs ( ) > 0 {
181
+ self . update_interval = update_interval;
182
+ }
179
183
self
180
184
}
181
185
@@ -205,7 +209,7 @@ impl HTTPFetcherBuilder {
205
209
match self . mode {
206
210
FetchMode :: Polling => {
207
211
if let Some ( request_timeout) = self . request_timeout {
208
- if request_timeout. as_nanos ( ) > 0 {
212
+ if request_timeout. as_secs ( ) > 0 {
209
213
client_builder = client_builder. timeout ( request_timeout) ;
210
214
}
211
215
}
You can’t perform that action at this time.
0 commit comments