Skip to content

Commit

Permalink
wip ++3
Browse files Browse the repository at this point in the history
  • Loading branch information
levb committed Oct 30, 2024
1 parent 28b098b commit 91b8cc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ _stop_service(microService *m, bool unsubscribe)
if (m == NULL)
return micro_ErrorInvalidArg;

printf("<>/<> microService_Stop %s\n", m->cfg->Name);
_lock_service(m);
alreadyStopped = m->stopped;
m->stopped = true;
Expand Down Expand Up @@ -315,7 +316,7 @@ void micro_release_endpoint_when_unsubscribed(void *closure)
m->stopped = true;
doneHandler = m->cfg->DoneHandler;
}
refs = --(m->refs);
refs = m->refs;
_unlock_service(m);

if (doneHandler != NULL)
Expand Down Expand Up @@ -422,6 +423,7 @@ _release_service(microService *m)

_unlock_service(m);

printf("<>/<> micro: release service %s refs=%d numEndpoints=%d\n", m->cfg->Name, refs, numEndpoints);
if ((refs == 0) && (numEndpoints == 0))
_free_service(m);
}
Expand Down

0 comments on commit 91b8cc1

Please sign in to comment.