Skip to content

Commit

Permalink
Fix timeout initialisation upon select() errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stewy committed Feb 7, 2012
1 parent a0a37e8 commit 0f535cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
Expand Up @@ -2,6 +2,9 @@ $Id: ChangeLog,v 1.85 2010/06/01 20:20:51 tho Exp $

ChangeLog file of KLone - http://koanlogic.com

KLone X.Y.Z:
- Fix timeout initialisation upon select() errors.

KLone 3.0.0:
- Add IPv6, SCTP, and UNIX IPC support via libu/net. This change breaks
the four following interfaces: request_[gs]et_{local,peer}_addr() which
Expand Down
2 changes: 1 addition & 1 deletion src/kloned/server.c
Expand Up @@ -910,10 +910,10 @@ int server_loop(server_t *s)
memcpy(&wrfds, &s->wrfds, sizeof(fd_set));
memcpy(&exfds, &s->exfds, sizeof(fd_set));

again:
/* wake up every second */
tv.tv_sec = 1; tv.tv_usec = 0;

again:
rc = select(1 + s->hfd, &rdfds, &wrfds, &exfds, &tv);
if(rc == -1 && errno == EINTR)
goto again; /* interrupted */
Expand Down

0 comments on commit 0f535cb

Please sign in to comment.