minor: Change timeout to 5s
This commit is contained in:
parent
b0294bdc40
commit
e5bbdd8384
2 changed files with 3 additions and 3 deletions
|
|
@ -111,7 +111,7 @@ impl BackendInfo {
|
|||
pub async fn connect(&self) -> Result<AbstractStream, BackendError> {
|
||||
// If addr is a relative or absolute path, consider it's a socket
|
||||
if self.addr.starts_with('.') || self.addr.starts_with('/') {
|
||||
match timeout(Duration::from_secs(1), UnixStream::connect(&self.addr)).await {
|
||||
match timeout(Duration::from_secs(5), UnixStream::connect(&self.addr)).await {
|
||||
Ok(Ok(stream)) => {
|
||||
trace!("connection established to {self}");
|
||||
Ok(stream.into())
|
||||
|
|
@ -126,7 +126,7 @@ impl BackendInfo {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
match timeout(Duration::from_secs(1), TcpStream::connect(&self.addr)).await {
|
||||
match timeout(Duration::from_secs(5), TcpStream::connect(&self.addr)).await {
|
||||
Ok(Ok(stream)) => {
|
||||
trace!("connection established to {self}");
|
||||
Ok(stream.into())
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ mod prelude;
|
|||
use prelude::*;
|
||||
mod stream;
|
||||
|
||||
const LDAP_CLIENT_IO_TIMEOUT: Duration = Duration::from_secs(1);
|
||||
const LDAP_CLIENT_IO_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum LdapError {
|
||||
|
|
|
|||
Loading…
Reference in a new issue