WRITE_REPLY,
WRITE_ERROR,
WAIT_FILTER,
- CLOSING_CONNECTION
+ CLOSING_CONNECTION,
+ WRITING_REPLY
} state; /**< current session state */
size_t content_length; /**< length of user's input */
enum rspamd_protocol proto; /**< protocol (rspamc or spamc) */
switch (task->state) {
case WRITE_REPLY:
+ task->state = WRITING_REPLY;
if (!write_reply (task)) {
return FALSE;
}
return FALSE;
break;
case WRITE_ERROR:
+ task->state = WRITING_REPLY;
if (!write_reply (task)) {
return FALSE;
}
destroy_session (task->s);
return FALSE;
break;
+ case WRITING_REPLY:
+ /* Do nothing here */
+ break;
default:
msg_info ("abnormally closing connection");
if (ctx->is_custom) {