Signed-off-by: Jens Axboe <axboe@kernel.dk>
static int handle_client(struct fio_client *client)
{
struct fio_net_cmd *cmd;
+ int done = 0;
while ((cmd = fio_net_recv_cmd(client->fd)) != NULL) {
dprint(FD_NET, "%s: got cmd op %d\n", client->hostname,
case FIO_NET_CMD_QUIT:
remove_client(client);
free(cmd);
+ done = 1;
break;
case FIO_NET_CMD_TEXT:
fwrite(cmd->payload, cmd->pdu_len, 1, stdout);
free(cmd);
break;
}
+
+ if (done)
+ break;
}
return 0;