summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_java.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2021-10-28 17:46:54 +0300
committerMax Romanov <max.romanov@nginx.com>2021-10-28 17:46:54 +0300
commitbba97134e983541e94cf73e93900729e3a3e61fc (patch)
treece0322c432f1d08cd302209f1403fab112788b2c /src/nxt_java.c
parent803e0373029a80994a85781d0b73b6cfa95bcf5a (diff)
downloadunit-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.c8
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;