appctx->ctx.cli.severity = LOG_ERR;
appctx->ctx.cli.msg = "'set server <srv> check-port' expects an integer as argument.\n";
appctx->st0 = CLI_ST_PRINT;
+ SPIN_UNLOCK(SERVER_LOCK, &sv->lock);
+ return 1;
}
if ((i < 0) || (i > 65535)) {
appctx->ctx.cli.severity = LOG_ERR;
appctx->ctx.cli.msg = "provided port is not valid.\n";
appctx->st0 = CLI_ST_PRINT;
+ SPIN_UNLOCK(SERVER_LOCK, &sv->lock);
+ return 1;
}
/* prevent the update of port to 0 if MAPPORTS are in use */
if ((sv->flags & SRV_F_MAPPORTS) && (i == 0)) {