summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-server.c
diff options
context:
space:
mode:
authorGravatar snowdrop2004-05-14 09:31:48 +0000
committerGravatar snowdrop2004-05-14 09:31:48 +0000
commit850754432a8a0e924cefd1c162b515a3ff9c7c9e (patch)
tree3d33ddfc1ab9a00b17d0e98f397e9887b0a8052a /nanohttp/nanohttp-server.c
parente57af9d56cdcabd66dcdf60ae942a56cbd71b625 (diff)
downloadcsoap-850754432a8a0e924cefd1c162b515a3ff9c7c9e.tar.gz
csoap-850754432a8a0e924cefd1c162b515a3ff9c7c9e.tar.bz2
timeout is explicitly set before each select() call
Diffstat (limited to 'nanohttp/nanohttp-server.c')
-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;