diff options
author | Max Romanov <max.romanov@nginx.com> | 2021-10-28 17:46:54 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2021-10-28 17:46:54 +0300 |
commit | bba97134e983541e94cf73e93900729e3a3e61fc (patch) | |
tree | ce0322c432f1d08cd302209f1403fab112788b2c /src/nxt_java.c | |
parent | 803e0373029a80994a85781d0b73b6cfa95bcf5a (diff) | |
download | unit-bba97134e983541e94cf73e93900729e3a3e61fc.tar.gz unit-bba97134e983541e94cf73e93900729e3a3e61fc.tar.bz2 |
Moving request limit control to libunit.
Introducting application graceful stop. For now only used when application
process reach request limit value.
This closes #585 issue on GitHub.
Diffstat (limited to 'src/nxt_java.c')
-rw-r--r-- | src/nxt_java.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/nxt_java.c b/src/nxt_java.c index ac715c0b..75c8ee19 100644 --- a/src/nxt_java.c +++ b/src/nxt_java.c @@ -428,7 +428,7 @@ nxt_java_start(nxt_task_t *task, nxt_process_data_t *data) return NXT_ERROR; } - nxt_unit_default_init(task, &java_init); + nxt_unit_default_init(task, &java_init, app_conf); java_init.callbacks.request_handler = nxt_java_request_handler; java_init.callbacks.websocket_handler = nxt_java_websocket_handler; @@ -437,7 +437,6 @@ nxt_java_start(nxt_task_t *task, nxt_process_data_t *data) java_init.request_data_size = sizeof(nxt_java_request_data_t); java_init.data = &java_data; java_init.ctx_data = env; - java_init.shm_limit = app_conf->shm_limit; ctx = nxt_unit_init(&java_init); if (nxt_slow_path(ctx == NULL)) { @@ -616,11 +615,6 @@ nxt_java_ready_handler(nxt_unit_ctx_t *ctx) nxt_java_data_t *java_data; nxt_java_app_conf_t *c; - /* Worker thread context. */ - if (!nxt_unit_is_main_ctx(ctx)) { - return NXT_UNIT_OK; - } - java_data = ctx->unit->data; c = java_data->conf; |