make it so that test_persistent_timeout can call loopexit only once; reported by Alexander Drozdov

svn:r1062
This commit is contained in:
Niels Provos 2009-01-27 16:35:28 +00:00
parent 1c927b7d2f
commit 3065389973

View File

@ -476,7 +476,9 @@ periodic_timeout_cb(int fd, short event, void *arg)
int *count = arg; int *count = arg;
(*count)++; (*count)++;
if (*count > 5) { if (*count == 6) {
/* call loopexit only once - on slow machines(?), it is
* apparently possible for this to get called twice. */
test_ok = 1; test_ok = 1;
event_base_loopexit(global_base, NULL); event_base_loopexit(global_base, NULL);
} }