Skip to content

Commit

Permalink
make liveness more aggressive on the client side
Browse files Browse the repository at this point in the history
  • Loading branch information
nullchinchilla committed Mar 14, 2024
1 parent 6e59ade commit fcf3788
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions binaries/geph5-client/src/client/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use geph5_misc_rpc::{
read_prepend_length, write_prepend_length,
};
use nursery_macro::nursery;
use picomux::PicoMux;
use picomux::{LivenessConfig, PicoMux};
use sillad::{dialer::Dialer as _, Pipe};
use smol::future::FutureExt as _;
use smol_timeout::TimeoutExt;
Expand Down Expand Up @@ -63,7 +63,12 @@ pub async fn client_inner(ctx: AnyCtx<Config>) -> anyhow::Result<()> {
.await
.context("overall dial/mux/auth timeout")??;
let (read, write) = authed_pipe.split();
let mux = Arc::new(PicoMux::new(read, write));
let mut mux = PicoMux::new(read, write);
mux.set_liveness(LivenessConfig {
ping_interval: Duration::from_secs(600),
timeout: Duration::from_secs(10),
});
let mux = Arc::new(mux);

let (send_stop, mut recv_stop) = tachyonix::channel(1);
// run a socks5 loop
Expand Down

0 comments on commit fcf3788

Please sign in to comment.