Add carve out to ignore ConnectPeer request if state is NodeShuttingDown (#5352)

This commit is contained in:
Chris Stewart 2024-01-13 14:40:12 -06:00 committed by GitHub
parent 421970dcf5
commit 56b1a557a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -553,6 +553,10 @@ case class PeerManager(
}
case (state, c: ConnectPeer) =>
state match {
case s: NodeShuttingDown =>
logger.warn(
s"Ignoring connect peer request as node is shutting down, c=$c")
Future.successful(s)
case runningState: NodeRunningState =>
val peer = c.peer
val curPeerData = finder.popFromCache(peer).get