/* Shutdown the server connection, if needed */
if (appctx->st0 != SPOE_APPCTX_ST_END) {
appctx->st0 = SPOE_APPCTX_ST_END;
+ applet_set_error(appctx);
if (spoe_appctx->status_code == SPOP_ERR_NONE)
spoe_appctx->status_code = SPOP_ERR_IO;
}
goto out;
}
- if (!SPOE_APPCTX(appctx)->spoe_ctx)
- appctx->st0 = SPOE_APPCTX_ST_EXIT;
-
switchstate:
switch (appctx->st0) {
/* case SPOE_APPCTX_ST_PROCESSING: */
case SPOE_APPCTX_ST_WAITING_ACK:
- if (!spoe_handle_receiving_frame_appctx(appctx))
+ if (!SPOE_APPCTX(appctx)->spoe_ctx) {
+ appctx->st0 = SPOE_APPCTX_ST_END;
+ applet_set_error(appctx);
+ }
+ else if (!spoe_handle_receiving_frame_appctx(appctx))
break;
goto switchstate;
if (!ctx)
return;
+ if (ctx->state != SPOE_CTX_ST_NONE || ctx->state == SPOE_CTX_ST_READY) {
+ ctx->status_code = SPOE_CTX_ERR_INTERRUPT;
+ _HA_ATOMIC_INC(&conf->agent->counters.nb_errors);
+ }
spoe_stop_processing(conf->agent, ctx);
pool_free(pool_head_spoe_ctx, ctx);
filter->ctx = NULL;