diff options
author | Cao jin <caoj.fnst@cn.fujitsu.com> | 2017-06-16 16:54:45 +0800 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-09-05 13:21:58 +0100 |
commit | b2587932582333197c88bf663785b19f441989d7 (patch) | |
tree | 2ef4ff597cc77de171acf83a1748f76fa2d6edca /io | |
parent | d4adf9675801cd90e66ecfcd6a54ca1abc5a6698 (diff) | |
download | qemu-b2587932582333197c88bf663785b19f441989d7.zip qemu-b2587932582333197c88bf663785b19f441989d7.tar.gz qemu-b2587932582333197c88bf663785b19f441989d7.tar.bz2 |
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 commit
e65c67e4 & 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>
Diffstat (limited to 'io')
-rw-r--r-- | io/channel-socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io/channel-socket.c b/io/channel-socket.c index 591d27e..563e297 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -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; |