Otherwise the status print thinks it's running, and displays
bad stats.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
struct netio_data *nd = td->io_ops->data;
struct netio_options *o = td->eo;
fio_socklen_t socklen = sizeof(nd->addr);
struct netio_data *nd = td->io_ops->data;
struct netio_options *o = td->eo;
fio_socklen_t socklen = sizeof(nd->addr);
if (o->proto == FIO_TYPE_UDP) {
f->fd = nd->listenfd;
return 0;
}
if (o->proto == FIO_TYPE_UDP) {
f->fd = nd->listenfd;
return 0;
}
+ state = td->runstate;
+ td_set_runstate(td, TD_SETTING_UP);
+
log_info("fio: waiting for connection\n");
if (poll_wait(td, nd->listenfd, POLLIN) < 0)
log_info("fio: waiting for connection\n");
if (poll_wait(td, nd->listenfd, POLLIN) < 0)
f->fd = accept(nd->listenfd, (struct sockaddr *) &nd->addr, &socklen);
if (f->fd < 0) {
td_verror(td, errno, "accept");
f->fd = accept(nd->listenfd, (struct sockaddr *) &nd->addr, &socklen);
if (f->fd < 0) {
td_verror(td, errno, "accept");
+ td_set_runstate(td, state);
+err:
+ td_set_runstate(td, state);
+ return 1;
}
static int fio_netio_open_file(struct thread_data *td, struct fio_file *f)
}
static int fio_netio_open_file(struct thread_data *td, struct fio_file *f)