service: don't use service instance if its in error state

This is almost certainly wrong. but it does avoid the livelock problems
I was having and will do until I can get Andreas to take a look.
This commit is contained in:
Adam Sutton 2013-06-09 12:45:28 +01:00
parent 957796d77f
commit f76ee7659a

View file

@ -275,7 +275,7 @@ service_find_instance(channel_t *ch, struct service_instance_list *sil,
// Check if any service is already running, if so, use that
LIST_FOREACH(si, sil, si_link)
if(si->si_s->s_status == SERVICE_RUNNING)
if(si->si_s->s_status == SERVICE_RUNNING && si->si_error == 0)
return si;
// Check if any is idle