Add read timeout to Baichuan socket
This might help with #13, although I remain unable to reproduce it exactly as described.
This commit is contained in:
1 parent
283f70cac4
commit
bfa1fdf3b3
1 file changed
+2
@@ -160,6 +160,8 @@ fn connect_to(addr: SocketAddr, timeout: Duration) -> Result<TcpStream> {
|
||||
};
|
||||
|
||||
socket.set_keepalive(Some(timeout))?;
|
||||
socket.set_read_timeout(Some(timeout))?;
|
||||
socket.set_write_timeout(Some(timeout))?;
|
||||
socket.connect_timeout(&addr.into(), timeout)?;
|
||||
|
||||
Ok(socket.into_tcp_stream())
|
||||
|
||||
Reference in new issue
Block a user