nxt_event_conn_job_sendfile.c (20:4dc92b438f58) nxt_event_conn_job_sendfile.c (56:92b4984ca3c1)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 170 unchanged lines hidden (view full) ---

179
180 nxt_debug(task, "event conn sendfile sent:%z", sent);
181
182 b = jbs->out;
183
184 /* The job must be destroyed before connection error handler. */
185 nxt_job_destroy(task, jbs);
186
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 170 unchanged lines hidden (view full) ---

179
180 nxt_debug(task, "event conn sendfile sent:%z", sent);
181
182 b = jbs->out;
183
184 /* The job must be destroyed before connection error handler. */
185 nxt_job_destroy(task, jbs);
186
187 if (c->write_state->process_buffers) {
187 if (0 /* STUB: c->write_state->process_buffers */) {
188 b = nxt_event_conn_job_sendfile_completion(task, c, b);
189
190 done = (b == NULL);
191
192 /* Add data which might be added after sendfile job has started. */
193 nxt_buf_chain_add(&b, c->write);
194 c->write = b;
195

--- 4 unchanged lines hidden (view full) ---

200 /* But new data has been added. */
201 nxt_event_conn_job_sendfile_start(task, c, NULL);
202 }
203
204 return;
205 }
206 }
207
188 b = nxt_event_conn_job_sendfile_completion(task, c, b);
189
190 done = (b == NULL);
191
192 /* Add data which might be added after sendfile job has started. */
193 nxt_buf_chain_add(&b, c->write);
194 c->write = b;
195

--- 4 unchanged lines hidden (view full) ---

200 /* But new data has been added. */
201 nxt_event_conn_job_sendfile_start(task, c, NULL);
202 }
203
204 return;
205 }
206 }
207
208 if (sent != 0 && c->write_state->autoreset_timer) {
208 if (sent != 0 && c->write_state->timer_autoreset) {
209 nxt_timer_disable(task->thread->engine, &c->write_timer);
210 }
211
212 if (c->socket.error == 0
213 && !nxt_event_conn_write_delayed(task->thread->engine, c, sent))
214 {
215 nxt_event_conn_timer(task->thread->engine, c, c->write_state,
216 &c->write_timer);

--- 45 unchanged lines hidden ---
209 nxt_timer_disable(task->thread->engine, &c->write_timer);
210 }
211
212 if (c->socket.error == 0
213 && !nxt_event_conn_write_delayed(task->thread->engine, c, sent))
214 {
215 nxt_event_conn_timer(task->thread->engine, c, c->write_state,
216 &c->write_timer);

--- 45 unchanged lines hidden ---