Skip to content

Commit

Permalink
feat: Log everytime onion service status changes
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron committed Nov 26, 2024
1 parent 6853a75 commit 6295fba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ impl Transport for TorTransport {
for (listener_id, listener) in self.listeners.iter_mut() {
// Check if the service has any new statuses
if let Poll::Ready(Some(status)) = listener.status_stream.as_mut().poll_next(cx) {
tracing::debug!(status = ?status.state(), "Onion service status changed");

if status.is_reachable() {
// TODO: We might report the address here multiple time to the swarm. Is this a problem?
return Poll::Ready(TransportEvent::NewAddress {
Expand Down

0 comments on commit 6295fba

Please sign in to comment.