Skip to content
  • Luiz Capitulino's avatar
    migration: don't rely on any QERR_SOCKET_* · 540c79fe
    Luiz Capitulino authored
    
    
    Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. The
    other errors are handled the same by checking if the error is set and
    then calling migrate_fd_error() if it's.
    
    It's also necessary to change inet_connect_opts() not to set
    QERR_SOCKET_CONNECT_IN_PROGRESS. This error is only used by
    tcp_start_outgoing_migration() and not changing it along with the
    usage of in_progress would break migration.
    
    Furthermore this commit fixes a bug. Today, there's a spurious error
    report when migration succeeds:
    
    (qemu) migrate tcp:0:4444
    migrate: Connection can not be completed immediately
    (qemu)
    
    After this commit no spurious error is reported anymore.
    
    Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
    Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
    540c79fe