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:
Julian Schindel
2026-07-29 11:22:20 +02:00
committed by Rob Bradford
parent 11eace2660
commit ee6cafdcdd

View File

@@ -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."