]> code.delx.au - gnu-emacs/commitdiff
Make url.el use async DNS
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 5 Feb 2016 03:03:26 +0000 (14:03 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 5 Feb 2016 03:03:26 +0000 (14:03 +1100)
* lisp/url/url-gw.el (url-open-stream): Use non-blocking DNS.

* src/process.c (syms_of_process): Add a `dns' subfeature for
make-network-process.

lisp/url/url-gw.el
src/process.c

index 460ee0dd4264c7477b0279350523c9411915cc96..4d1dce68cbe441632a3112c8db26b07b4b113581 100644 (file)
@@ -245,8 +245,9 @@ overriding the value of `url-gateway-method'."
                           name buffer host service
                           :type gw-method
                           ;; Use non-blocking socket if we can.
-                          :nowait (featurep 'make-network-process
-                                            '(:nowait t))))
+                          :nowait (and (featurep 'make-network-process
+                                                  '(:nowait t))
+                                        'dns)))
                         (`socks
                          (socks-open-network-stream name buffer host service))
                         (`telnet
index 86ca3f339ac2310ac90c3d11218a2993f8a946cd..9653eba1e285eb12ed3916177a1278ac3ac412a1 100644 (file)
@@ -7921,6 +7921,9 @@ The variable takes effect when `start-process' is called.  */);
 
 #ifdef NON_BLOCKING_CONNECT
    ADD_SUBFEATURE (QCnowait, Qt);
+#ifdef HAVE_GETADDRINFO_A
+   ADD_SUBFEATURE (QCnowait, Qdns);
+#endif
 #endif
 #ifdef DATAGRAM_SOCKETS
    ADD_SUBFEATURE (QCtype, Qdatagram);