socket: 0.982 PID: 0.882 device: 0.838 performance: 0.828 network: 0.764 architecture: 0.761 graphic: 0.745 ppc: 0.662 kernel: 0.644 register: 0.548 debug: 0.546 hypervisor: 0.493 peripherals: 0.491 permissions: 0.446 semantic: 0.438 i386: 0.438 vnc: 0.421 assembly: 0.405 arm: 0.403 boot: 0.400 x86: 0.383 risc-v: 0.369 KVM: 0.348 files: 0.304 VMM: 0.289 TCG: 0.278 mistranslation: 0.250 user-level: 0.201 virtual: 0.128 QEMU does not close listening socket for incoming migration when post-copy migration breaks Description of problem: QEMU keeps listening on the incoming port even after breaking a post-copy migration using "migrate-pause" QMP command. And even once migration is finished after recovering it "migrate-recover" using a different port number. If "migrate-recover" is called with a URI specifying the original port (which is still in LISTEN state), QEMU reports "Failed to find an available port: Address already in use". Steps to reproduce: 1. start migration 2. wait for the first iteration to finish 3. switch to post-copy using "migrate-start-postcopy" 3. break migration with "migrate-pause" 4. check lsof -p $QEMU_PID Additional information: