Skip to content

Commit d99c5d5

Browse files
authored
fix(core): HTTP timeout not working on Windows, closes #4050 (#4185)
1 parent ae99f99 commit d99c5d5

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes HTTP timeout not working on Windows when using the `attohttpc` client.

core/tauri/src/api/http.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ impl Client {
143143

144144
if let Some(timeout) = request.timeout {
145145
request_builder = request_builder.timeout(timeout);
146+
#[cfg(windows)]
147+
{
148+
// on Windows the global timeout is not respected, see https://github.com/sbstp/attohttpc/issues/118
149+
request_builder = request_builder.read_timeout(timeout);
150+
}
146151
}
147152

148153
let response = if let Some(body) = request.body {

0 commit comments

Comments
 (0)