From dfe5e599e41c57cf68f21beb3961a5b5ec537723 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 8 Nov 2011 18:31:35 -0700 Subject: [PATCH] fix problem with background thread for address lookup --- src/racket/src/network.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/racket/src/network.c b/src/racket/src/network.c index 888234e70b..e071511f0e 100644 --- a/src/racket/src/network.c +++ b/src/racket/src/network.c @@ -490,6 +490,8 @@ static intptr_t getaddrinfo_in_thread(void *_data) } while ((cr == -1) && (errno == EINTR)); # endif + res = NULL; + ok = mz_getaddrinfo(hn_copy[0] ? hn_copy : NULL, sn_copy[0] ? sn_copy : NULL, &hints, &res); @@ -658,7 +660,7 @@ static int MZ_GETADDRINFO(const char *name, const char *svc, struct mz_addrinfo } if (!ok) { - getaddrinfo_in_thread(rec); + getaddrinfo_in_thread(ghbn_thread_data); rec->result = ghbn_thread_data->ghbn_result; ghbn_thread_data->ghbn_result = NULL; rec->err = ghbn_thread_data->ghbn_err;