new->strip_eol = TRUE;
new->half_closed = FALSE;
new->want_read = TRUE;
+ new->is_restored = FALSE;
new->ev = memory_pool_alloc0 (new->pool, sizeof (struct event));
new->fd = fd;
remove_async_thread (task->s);
}
}
+ if (task->is_skipped) {
+ /* Call write_socket to write reply and exit */
+ return write_socket (task);
+ }
}
else {
lua_call_pre_filters (task);
return write_socket (task);
}
/* Add task to classify to classify pool */
- if (ctx->classify_pool) {
+ if (!task->is_skipped && ctx->classify_pool) {
register_async_thread (task->s);
g_thread_pool_push (ctx->classify_pool, task, &err);
if (err != NULL) {
remove_async_thread (task->s);
}
}
+ if (task->is_skipped) {
+ /* Call write_socket again to write reply and exit */
+ return write_socket (task);
+ }
break;
default:
msg_info ("abnormally closing connection at state: %d", task->state);