Timeouts reduced to 50 ms
This commit is contained in:
parent
ac2b515905
commit
f0c431aec3
1 changed files with 4 additions and 4 deletions
|
|
@ -35,7 +35,7 @@ impl DownStreamInner {
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
|
||||||
match data_in.recv_timeout(Duration::from_millis(100)) {
|
match data_in.recv_timeout(Duration::from_millis(50)) {
|
||||||
|
|
||||||
// DataPipe Received
|
// DataPipe Received
|
||||||
Ok(data_received) => {
|
Ok(data_received) => {
|
||||||
|
|
@ -198,7 +198,7 @@ impl UpStreamInner {
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
|
||||||
match data_in.recv_timeout(Duration::from_millis(100)) {
|
match data_in.recv_timeout(Duration::from_millis(50)) {
|
||||||
|
|
||||||
Ok(data_received) => {
|
Ok(data_received) => {
|
||||||
|
|
||||||
|
|
@ -361,7 +361,7 @@ impl<H: HandlerCallbacks + std::marker::Sync + std::marker::Send + Clone + 'stat
|
||||||
|
|
||||||
pub fn new(ds_tcp_stream: SslStream<TcpStream>, remote_endpoint: String, handlers: InnerHandlers<H>) -> Self {
|
pub fn new(ds_tcp_stream: SslStream<TcpStream>, remote_endpoint: String, handlers: InnerHandlers<H>) -> Self {
|
||||||
|
|
||||||
let _ = ds_tcp_stream.get_ref().set_read_timeout(Some(Duration::from_millis(100)));
|
let _ = ds_tcp_stream.get_ref().set_read_timeout(Some(Duration::from_millis(50)));
|
||||||
|
|
||||||
FullDuplexTcp {
|
FullDuplexTcp {
|
||||||
ds_tcp_stream: Arc::new(Mutex::new(ds_tcp_stream)),
|
ds_tcp_stream: Arc::new(Mutex::new(ds_tcp_stream)),
|
||||||
|
|
@ -548,7 +548,7 @@ impl<H: HandlerCallbacks + std::marker::Sync + std::marker::Send + Clone + 'stat
|
||||||
Mutex::new(
|
Mutex::new(
|
||||||
s
|
s
|
||||||
)));
|
)));
|
||||||
let _ = self.us_tcp_stream.as_ref().unwrap().lock().unwrap().get_ref().set_read_timeout(Some(Duration::from_millis(100)));
|
let _ = self.us_tcp_stream.as_ref().unwrap().lock().unwrap().get_ref().set_read_timeout(Some(Duration::from_millis(50)));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue