Skip to content

Commit

Permalink
fix connector limit when equal to 0
Browse files Browse the repository at this point in the history
fixes #2514
  • Loading branch information
robjtede committed Mar 8, 2022
1 parent 9b1db1b commit f74ce86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion awc/src/client/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,12 @@ where
///
/// The default limit size is 100.
pub fn limit(mut self, limit: usize) -> Self {
self.config.limit = limit;
if limit == 0 {
self.config.limit = u32::MAX as usize;
} else {
self.config.limit = limit;
}

self
}

Expand Down

0 comments on commit f74ce86

Please sign in to comment.