mirror of https://github.com/yandex/odyssey.git
odissey: set client readahead
This commit is contained in:
parent
c13c4d0e11
commit
cf823e87ee
|
@ -84,11 +84,13 @@ int od_cancel(od_instance_t *instance,
|
|||
machine_io_free(io);
|
||||
return -1;
|
||||
}
|
||||
#if 0
|
||||
rc = machine_set_readahead(io, instance->scheme.readahead);
|
||||
if (rc == -1) {
|
||||
od_error(&instance->log, NULL, "(cancel) failed to set readahead");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
so_stream_t stream;
|
||||
so_stream_init(&stream);
|
||||
|
|
|
@ -363,6 +363,13 @@ void od_frontend(void *arg)
|
|||
od_client_free(client);
|
||||
return;
|
||||
}
|
||||
rc = machine_set_readahead(client->io, instance->scheme.readahead);
|
||||
if (rc == -1) {
|
||||
od_error(&instance->log, client->io, "failed to set client readahead");
|
||||
machine_close(client->io);
|
||||
od_client_free(client);
|
||||
return;
|
||||
}
|
||||
|
||||
/* client startup */
|
||||
rc = od_frontend_startup(client);
|
||||
|
@ -380,7 +387,6 @@ void od_frontend(void *arg)
|
|||
od_frontend_close(client);
|
||||
od_cancel(relay, &key);
|
||||
#endif
|
||||
|
||||
od_frontend_close(client);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue