diff --git a/src/github/mod.rs b/src/github/mod.rs index cad3955..6b425bc 100644 --- a/src/github/mod.rs +++ b/src/github/mod.rs @@ -27,6 +27,7 @@ pub async fn run(mut args: Skip) { env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION") )) + .timeout(60) .build() .unwrap(); let text = client diff --git a/src/gitlab/mod.rs b/src/gitlab/mod.rs index 7c4185a..7aeb350 100644 --- a/src/gitlab/mod.rs +++ b/src/gitlab/mod.rs @@ -2,7 +2,7 @@ mod structs; use quick_xml::events::{BytesEnd, BytesStart, BytesText, Event}; use quick_xml::{Reader, Writer}; -use reqwest::{Client, Url}; +use reqwest::{ClientBuilder, Url}; use std::borrow::Cow; use std::env; use std::io::Cursor; @@ -17,7 +17,7 @@ pub async fn run(mut args: Skip) { "mr" => structs::MR_QUERY, _ => panic!("Unknown type"), }; - let client = Client::new(); + let client = ClientBuilder::new().timeout(60).build().unwrap(); let text = client .post("https://gitlab.com/api/graphql") .body(