mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
Set read/write timeouts for IMAP SOCKS5 streams
This commit is contained in:
@@ -48,10 +48,9 @@ impl SessionStream for Pin<Box<TimeoutStream<TcpStream>>> {
|
||||
self.as_mut().set_read_timeout_pinned(timeout);
|
||||
}
|
||||
}
|
||||
impl SessionStream for Socks5Stream<TcpStream> {
|
||||
fn set_read_timeout(&mut self, _timeout: Option<Duration>) {
|
||||
// FIXME: build SOCKS streams on top of TimeoutStream, not directly TcpStream,
|
||||
// so we can set a read timeout for them.
|
||||
impl SessionStream for Socks5Stream<Pin<Box<TimeoutStream<TcpStream>>>> {
|
||||
fn set_read_timeout(&mut self, timeout: Option<Duration>) {
|
||||
self.get_socket_mut().set_read_timeout(timeout)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user