aboutsummaryrefslogtreecommitdiffstats
path: root/util/http.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--util/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/http.c b/util/http.c
index 989abd150..19393c360 100644
--- a/util/http.c
+++ b/util/http.c
@@ -930,13 +930,13 @@ connect_server( const char *server, ushort port, unsigned int flags,
if(!connected)
{
+ int err=errno;
#ifdef _WIN32
if(hostfound)
log_error("%s: Unable to connect: ec=%d\n",server,(int)WSAGetLastError());
else
log_error("%s: Host not found: ec=%d\n",server,(int)WSAGetLastError());
#else
- int err=errno;
if(hostfound)
log_error("%s: %s\n",server,strerror(err));
else