mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-04 12:02:55 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user