node: Small changes and note around initial state

This commit is contained in:
cloudhead 2024-04-01 16:32:30 +02:00
parent 9a60d4ad7f
commit 2b9a014243
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View File

@ -1653,7 +1653,7 @@ where
}
}
(session::State::Attempted { .. } | session::State::Initial, msg) => {
error!(target: "service", "Received {:?} from connecting peer {}", msg, peer.id);
debug!(target: "service", "Ignoring unexpected message {:?} from connecting peer {}", msg, peer.id);
}
(session::State::Disconnected { .. }, msg) => {
debug!(target: "service", "Ignoring {:?} from disconnected peer {}", msg, peer.id);

View File

@ -905,6 +905,8 @@ where
target: "wire",
"Attempt to connect to already connected peer {node_id}"
);
// FIXME: The problem here is the session will stay in "initial" state,
// because it can't transition to attempted.
continue;
}
self.service.attempted(node_id, addr.clone());