Set `read_timeout` to something low - this is random, and i have not reason behind `10 miliseconds`.
This commit is contained in:
parent
66ddc37a39
commit
aa35f99f5d
|
@ -74,7 +74,7 @@ impl Host {
|
|||
Err(e) => return Err(HostError::ReadError),
|
||||
};
|
||||
|
||||
match stream.set_read_timeout(Some(Duration::new(1, 0))) {
|
||||
match stream.set_read_timeout(Some(Duration::from_millis(10))) {
|
||||
Ok(_) => {}
|
||||
Err(_) => return Err(HostError::ReadError),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue