Enable TCP keepalive on Baichuan connections

More help for #6 on GitHub. Can't reproduce the exact issue, but there
are several related ones.
This commit is contained in:
George Hilliard committed 2020-05-11 22:24:45 -05:00
1 parent 98f2e2602d
commit 5439f45eab
1 file changed
+1
+1
View File
@@ -153,6 +153,7 @@ fn connect_to(addr: SocketAddr, timeout: Duration) -> Result<TcpStream> {
}
};
socket.set_keepalive(Some(timeout))?;
socket.connect_timeout(&addr.into(), timeout)?;
Ok(socket.into_tcp_stream())