Skip to content

Commit

Permalink
Log error. Set keep_alive to false.
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Ermolaev committed Mar 9, 2023
1 parent 0def960 commit 1ba4e1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions swarm/src/handler/one_shot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ where
}
ConnectionEvent::DialUpgradeError(DialUpgradeError { error, .. }) => {
if self.pending_error.is_none() {
log::debug!("DialUpgradeError: {error:?}");
self.pending_error = Some(error);
self.keep_alive = KeepAlive::No;
}
}
ConnectionEvent::AddressChange(_) | ConnectionEvent::ListenUpgradeError(_) => {}
Expand Down

0 comments on commit 1ba4e1a

Please sign in to comment.