In init_srv_requeue(), only attempt to run the tasklet if the server is
actually running, otherwise it will end up being queued a second time,
when the server is actually brought up, and that will lead to a
corrupted mt_list.
This can easily be reproduced by adding a dynamic server, as those start
disabled, and then enabling and disabling it a couple of times.
This should fix github issue #3360.
This should be backported up to 3.2.
* failed to queue itself when brought up, which could happen if
* a memory allocation failed.
*/
- tasklet_wakeup(t);
+ if (srv->cur_state != SRV_ST_STOPPED)
+ tasklet_wakeup(t);
return ERR_NONE;
}