chore: add a TODO

This commit is contained in:
Yujia Qiao 2021-12-19 11:18:01 +08:00
parent ed3b3a9831
commit 776bce35cb
No known key found for this signature in database
GPG Key ID: DC129173B148701B
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ impl<'a, T: 'static + Transport> Server<'a, T> {
if let Some(err) = err.downcast_ref::<io::Error>() {
// If it is an IO error, then it's possibly an
// EMFILE. So sleep for a while and retry
// TODO: Only sleep for EMFILE, ENFILE, ENOMEM, ENOBUFS
if let Some(d) = backoff.next_backoff() {
error!("Failed to accept: {}. Retry in {:?}...", err, d);
time::sleep(d).await;