From 18f54e2fc507fb560d405301cdeeab294034e019 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Thu, 1 Dec 2005 23:31:02 +0000 Subject: [PATCH] Finish fix for #11. ETIMEOUT/WSAETIMEDOUT error code set on connection timeout. --- src/event.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/event.c b/src/event.c index a6d4c3a..7e2deac 100644 --- a/src/event.c +++ b/src/event.c @@ -18,6 +18,9 @@ #ifndef _WIN32 #include +#else +#include +#define ETIMEOUT WSAETIMEOUT #endif #include "strophe.h" @@ -123,6 +126,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout) conn->connect_timeout) FD_SET(conn->sock, &wfds); else { + conn->error = ETIMEOUT; xmpp_info(ctx, "xmpp", "Connection attempt timed out."); conn_disconnect(conn); }