diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-08-02 16:56:54 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-08-02 16:56:54 +0100 |
commit | 6a9137f4319951b370b5b94e5d3049d6430e031d (patch) | |
tree | 631b00d859d37f64bf314ae5f8eb0bd636a4427e /frontends | |
parent | 1150cf684d7b9a47fb6780d4bf22cd3d89df28da (diff) | |
download | netsurf-6a9137f4319951b370b5b94e5d3049d6430e031d.tar.gz netsurf-6a9137f4319951b370b5b94e5d3049d6430e031d.tar.bz2 |
monkey: Run scheduler before extracting fdsets
We need to run the scheduler *before* we extract the fdsets from
the fetchers, otherwise fetch aborts might result in EBADF
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/monkey/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c index 87a486d33..9e05d3517 100644 --- a/frontends/monkey/main.c +++ b/frontends/monkey/main.c @@ -263,6 +263,9 @@ static void monkey_run(void) while (!monkey_done) { + /* discover the next scheduled event time */ + schedtm = monkey_schedule_run(); + /* clears fdset */ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd); @@ -273,9 +276,6 @@ static void monkey_run(void) FD_SET(0, &read_fd_set); FD_SET(0, &exc_fd_set); - /* discover the next scheduled event time */ - schedtm = monkey_schedule_run(); - /* setup timeout */ switch (schedtm) { case -1: |