Skip to content

Commit

Permalink
Add finite timeout on CURL metrics endpoint. (#22)
Browse files Browse the repository at this point in the history
Prevent CURL hanging up without timeout when connection can't be established. Creating a deadlock on the filesystem when executed behind a proxy.
  • Loading branch information
SoftwareApe authored Mar 15, 2021
1 parent 8027bea commit 41bd041
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vcpkg/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ namespace vcpkg::Metrics
// TODO: convert to cmd_execute_background or something.
auto curl = System::Command("curl")
.string_arg("https://dc.services.visualstudio.com/v2/track")
.string_arg("--max-time")
.string_arg("3")
.string_arg("-H")
.string_arg("Content-Type: application/json")
.string_arg("-X")
Expand Down

0 comments on commit 41bd041

Please sign in to comment.