summaryrefslogtreecommitdiff
path: root/deps/cares/src/ares_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/cares/src/ares_process.c')
-rw-r--r--deps/cares/src/ares_process.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/deps/cares/src/ares_process.c b/deps/cares/src/ares_process.c
index c3ac77b00e..0325f5191d 100644
--- a/deps/cares/src/ares_process.c
+++ b/deps/cares/src/ares_process.c
@@ -1031,6 +1031,17 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
}
#endif
+ if (channel->sock_config_cb)
+ {
+ int err = channel->sock_config_cb(s, SOCK_STREAM,
+ channel->sock_config_cb_data);
+ if (err < 0)
+ {
+ sclose(s);
+ return err;
+ }
+ }
+
/* Connect to the server. */
if (connect(s, sa, salen) == -1)
{
@@ -1115,6 +1126,17 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
return -1;
}
+ if (channel->sock_config_cb)
+ {
+ int err = channel->sock_config_cb(s, SOCK_DGRAM,
+ channel->sock_config_cb_data);
+ if (err < 0)
+ {
+ sclose(s);
+ return err;
+ }
+ }
+
/* Connect to the server. */
if (connect(s, sa, salen) == -1)
{