summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nanohttp/nanohttp-server.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nanohttp/nanohttp-server.c b/nanohttp/nanohttp-server.c
index bbd741f..23c71d9 100644
--- a/nanohttp/nanohttp-server.c
+++ b/nanohttp/nanohttp-server.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-server.c,v 1.5 2004/03/26 13:37:57 snowdrop Exp $
+ * $Id: nanohttp-server.c,v 1.6 2004/05/14 09:31:48 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -376,10 +376,11 @@ int httpd_run()
FD_ZERO(&fds);
FD_SET(_httpd_socket, &fds);
- select(1, &fds, NULL, NULL, &timeout);
-
- while (_httpd_run && (FD_ISSET(_httpd_socket, &fds)))
+ {
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
select(1, &fds, NULL, NULL, &timeout);
+ } while (_httpd_run && (FD_ISSET(_httpd_socket, &fds)))
if (!_httpd_run)
break;