summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_unit.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-11-18 22:33:53 +0300
committerMax Romanov <max.romanov@nginx.com>2020-11-18 22:33:53 +0300
commit66bb41e8bbe81d82a66f0d7188ad89963b4cd251 (patch)
treeced2d3b93e1cdbcd9c3962f62cfa0b19faf4b301 /src/nxt_unit.c
parent6c3c83561a97b91f18a771e0c582c5ed4013a9a6 (diff)
downloadunit-66bb41e8bbe81d82a66f0d7188ad89963b4cd251.tar.gz
unit-66bb41e8bbe81d82a66f0d7188ad89963b4cd251.tar.bz2
Libunit: fixing read buffer allocations on exit.
Diffstat (limited to 'src/nxt_unit.c')
-rw-r--r--src/nxt_unit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nxt_unit.c b/src/nxt_unit.c
index 69948954..0790afc4 100644
--- a/src/nxt_unit.c
+++ b/src/nxt_unit.c
@@ -5029,12 +5029,12 @@ retry:
nxt_unit_process_ready_req(ctx);
- rbuf = nxt_unit_read_buf_get(ctx);
- if (nxt_slow_path(rbuf == NULL)) {
- return NXT_UNIT_ERROR;
- }
-
if (ctx_impl->online) {
+ rbuf = nxt_unit_read_buf_get(ctx);
+ if (nxt_slow_path(rbuf == NULL)) {
+ return NXT_UNIT_ERROR;
+ }
+
goto retry;
}