else {
if (! rspamd_dispatcher_write (task->dispatcher, outbuf, r, FALSE, FALSE)) {
cd->alive = FALSE;
+ return;
}
if (task->cmd == CMD_SYMBOLS && metric_value != NULL) {
if (! show_metric_symbols (metric_res, cd)) {
cd->alive = FALSE;
+ return;
}
}
}
switch (task->state) {
case WRITE_REPLY:
if (! write_reply (task)) {
+ destroy_session (task->s);
return FALSE;
}
if (ctx->is_custom) {
if (ctx->is_custom) {
fin_custom_filters (task);
}
- destroy_session (task->s);
+ if (task->state != WRITE_REPLY) {
+ destroy_session (task->s);
+ }
}
struct worker_task *