mirror of
https://github.com/libevent/libevent.git
synced 2025-01-20 05:02:55 +08:00
make it so that test_persistent_timeout can call loopexit only once; reported by Alexander Drozdov
svn:r1062
This commit is contained in:
parent
1c927b7d2f
commit
3065389973
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user