throttle down client re-connect retries
This commit is contained in:
parent
e986945e4e
commit
4268bd6037
@ -51,6 +51,10 @@ pub async fn manage_connection(
|
|||||||
Ok(conn) => conn,
|
Ok(conn) => conn,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
log::error!("[relay] [connection] {err}");
|
log::error!("[relay] [connection] {err}");
|
||||||
|
|
||||||
|
// sleep 1 second to avoid drawing too much CPU
|
||||||
|
time::sleep(Duration::from_secs(1)).await;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user