storcon: handle heartbeater shutdown gracefully (#8767)

if a heartbeat happens during shutdown, then the task is already
cancelled and will not be sending responses.

Fixes: #8766
This commit is contained in:
Joonas Koivunen
2024-08-21 14:28:27 +03:00
committed by GitHub
parent 21b684718e
commit 477246f42c

View File

@@ -87,9 +87,12 @@ impl Heartbeater {
pageservers,
reply: sender,
})
.unwrap();
.map_err(|_| HeartbeaterError::Cancel)?;
receiver.await.unwrap()
receiver
.await
.map_err(|_| HeartbeaterError::Cancel)
.and_then(|x| x)
}
}