Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incusd/instance/qemu/qmp: Don't risk blocking QMP on eject #448

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions internal/server/instance/drivers/qmp/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ func (m *Monitor) start() error {
if e.Event == EventDiskEjected {
id, ok := e.Data["id"].(string)
if ok {
err = m.Eject(id)
if err != nil {
logger.Warnf("Unable to eject media %q: %v", id, err)
}
go func() {
err = m.Eject(id)
if err != nil {
logger.Warnf("Unable to eject media %q: %v", id, err)
}
}()
}
}

Expand Down
Loading