Skip to content

Commit

Permalink
Set TCP keepalive just like git does
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Nov 15, 2022
1 parent 70303c1 commit ee0276c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git-transport/src/client/blocking_io/http/curl/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ pub fn new() -> (
handle.http_headers(headers)?;
handle.transfer_encoding(false)?;
handle.connect_timeout(connect_timeout)?;
handle.tcp_keepalive(true)?;

if low_speed_time_seconds > 0 && low_speed_limit_bytes_per_second > 0 {
handle.low_speed_limit(low_speed_limit_bytes_per_second)?;
handle.low_speed_time(Duration::from_secs(low_speed_time_seconds))?;
Expand Down

0 comments on commit ee0276c

Please sign in to comment.