Skip to content

Commit

Permalink
fix(firehose): Add a firehose connect_timeout (#3810)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoyvens authored Aug 3, 2022
1 parent 242c17f commit 0bce8c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions graph/src/firehose/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use futures03::StreamExt;
use http::uri::{Scheme, Uri};
use rand::prelude::IteratorRandom;
use slog::Logger;
use std::{collections::BTreeMap, fmt::Display, sync::Arc};
use std::{collections::BTreeMap, fmt::Display, sync::Arc, time::Duration};
use tonic::{
metadata::MetadataValue,
transport::{Channel, ClientTlsConfig},
Expand Down Expand Up @@ -55,7 +55,8 @@ impl FirehoseEndpoint {
.tls_config(ClientTlsConfig::new())
.expect("TLS config on this host is invalid"),
_ => panic!("invalid uri scheme for firehose endpoint"),
};
}
.connect_timeout(Duration::from_secs(10));

let uri = endpoint.uri().to_string();
//connect_lazy() used to return Result, but not anymore, that makes sence since Channel is not used immediatelly
Expand Down

0 comments on commit 0bce8c8

Please sign in to comment.