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 10, 2023
1 parent aedecf7 commit 4eaa82d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion swarm/src/handler/one_shot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ where
}
ConnectionEvent::DialUpgradeError(DialUpgradeError { error, .. }) => {
if self.pending_error.is_none() {
self.pending_error = Some(error);
log::debug!("DialUpgradeError: {error}");
self.keep_alive = KeepAlive::No;
}
}
ConnectionEvent::AddressChange(_) | ConnectionEvent::ListenUpgradeError(_) => {}
Expand Down

0 comments on commit 4eaa82d

Please sign in to comment.