aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hostip.c')
-rw-r--r--lib/hostip.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index a21613061..fc2513cc2 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -409,10 +409,12 @@ int Curl_resolv(struct connectdata *conn,
#ifdef HAVE_SIGSETJMP
/* this allows us to time-out from the name resolver, as the timeout
will generate a signal and we will siglongjmp() from that here */
- if(!data->set.no_signal && sigsetjmp(curl_jmpenv, 1)) {
- /* this is coming from a siglongjmp() */
- failf(data, "name lookup timed out");
- return CURLRESOLV_ERROR;
+ if(!data->set.no_signal) {
+ if (sigsetjmp(curl_jmpenv, 1)) {
+ /* this is coming from a siglongjmp() */
+ failf(data, "name lookup timed out");
+ return CURLRESOLV_ERROR;
+ }
}
#endif