Skip to content

Commit

Permalink
wip ++
Browse files Browse the repository at this point in the history
  • Loading branch information
levb committed Oct 31, 2024
1 parent a973019 commit df284c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ void natsSub_release(natsSubscription *sub)
natsSub_Unlock(sub);

if (refs == 0)
{
_freeSub(sub);
}
}

void natsSub_unlockRelease(natsSubscription *sub)
Expand Down
7 changes: 3 additions & 4 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33583,18 +33583,17 @@ _startManyMicroservices(microService** svcs, int n, natsConnection *nc, microSer
}

#define _waitForMicroservicesAllDone(_arg) \
{ \
{ q \
natsMutex_Lock((_arg)->m); \
testf("Wait for %d microservices to stop: ", (_arg)->microRunningServiceCount); \
natsStatus waitStatus = NATS_OK; \
bool allDone = false; \
while ((waitStatus != NATS_TIMEOUT) && !(_arg)->microAllDone) \
waitStatus = natsCondition_TimedWait((_arg)->c, (_arg)->m, 100); /*<>/<>*/ \
waitStatus = natsCondition_TimedWait((_arg)->c, (_arg)->m, 1000); \
allDone = (_arg)->microAllDone; \
natsMutex_Unlock((_arg)->m); \
testCond((NATS_OK == waitStatus) && allDone); \
} \
nats_Sleep(1);
}

#define _destroyMicroservice(_s) \
testf("Destroy microservice %s: ", (_s)->cfg->Name); \
Expand Down

0 comments on commit df284c9

Please sign in to comment.