mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
util: remove the obsolete non-blocking connect
The non-blocking connect mechanism is obsolete, and it doesn't work well in inet connection, because it will call getaddrinfo first and getaddrinfo will blocks on DNS lookups. Since commite65c67e4
&d984464e
, the non-blocking connect of migration goes through QIOChannel in a different manner(using a thread), and nobody use this old non-blocking connect anymore. Any newly written code which needs a non-blocking connect should use the QIOChannel code, so we can drop NonBlockingConnectHandler as a concept entirely. Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
d4adf96758
commit
b258793258
5 changed files with 28 additions and 195 deletions
|
@ -140,7 +140,7 @@ int qio_channel_socket_connect_sync(QIOChannelSocket *ioc,
|
|||
int fd;
|
||||
|
||||
trace_qio_channel_socket_connect_sync(ioc, addr);
|
||||
fd = socket_connect(addr, NULL, NULL, errp);
|
||||
fd = socket_connect(addr, errp);
|
||||
if (fd < 0) {
|
||||
trace_qio_channel_socket_connect_fail(ioc);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue