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 0a973c8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@ 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(),
address = listener.onion_address.to_string(),
"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 0a973c8

Please sign in to comment.