diff options
Diffstat (limited to 'src/ivyloop.c')
-rw-r--r-- | src/ivyloop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ivyloop.c b/src/ivyloop.c index 46f8fba..a407fae 100644 --- a/src/ivyloop.c +++ b/src/ivyloop.c @@ -171,7 +171,8 @@ void IvyMainLoop(void(*BeforeSelect)(void),void(*AfterSelect)(void)) rdset = open_fds; exset = open_fds; ready = select(64, &rdset, 0, &exset, TimerGetSmallestTimeout()); - if (AfterSelect) (*AfterSelect)(); + /* for compatibility with older version we test also the first parameter */ + if (BeforeSelect && AfterSelect) (*AfterSelect)(); if (ready < 0 && (errno != EINTR)) { fprintf (stderr, "select error %d\n",errno); |