mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: clean up migration threads on failure
Migration threads may be left orphaned and keep the socket bound after a migration has failed. Prevent this by signaling termination via the `kill_evt` in `ReceiveAdditionalConnections`'s `Drop` impl. On-behalf-of: SAP julian.schindel@sap.com Signed-off-by: Julian Schindel <julian.schindel@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
11eace2660
commit
ee6cafdcdd
@@ -589,6 +589,9 @@ impl ReceiveAdditionalConnections {
|
||||
|
||||
impl Drop for ReceiveAdditionalConnections {
|
||||
fn drop(&mut self) {
|
||||
if let Err(error) = self.kill_evt.write(1) {
|
||||
warn!("Failed to write to kill eventfd: {error}");
|
||||
}
|
||||
if self.accept_thread.is_some() {
|
||||
warn!(
|
||||
"ReceiveAdditionalConnections was not cleaned up! Either cleanup() was never called (programming error) or it failed before completing."
|
||||
|
||||
Reference in New Issue
Block a user