Skip to content

Commit

Permalink
wip ++6
Browse files Browse the repository at this point in the history
  • Loading branch information
levb committed Nov 1, 2024
1 parent b779569 commit 1ca7f08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -4471,7 +4471,7 @@ natsConn_defaultErrHandler(natsConnection *nc, natsSubscription *sub, natsStatus
int natsConn_getServices(microService ***services, natsConnection *nc)
{
int numServices = 0;
natsConn_Lock(nc); // or use subsMu? <>/<> TODO
natsConn_Lock(nc);
*services = nc->services;
numServices = nc->numServices;
natsConn_Unlock(nc);
Expand Down
2 changes: 0 additions & 2 deletions src/micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ _new_service(microService **ptr, natsConnection *nc)
if (*ptr == NULL)
return micro_ErrorOutOfMemory;

natsConn_retain(nc);
(*ptr)->refs = 1;
(*ptr)->nc = nc;
(*ptr)->started = nats_Now() * 1000000;
Expand Down Expand Up @@ -472,7 +471,6 @@ _free_service(microService *m)
}

_free_cloned_service_config(m->cfg);
natsConn_release(m->nc);
natsMutex_Destroy(m->service_mu);
NATS_FREE(m);
}
Expand Down

0 comments on commit 1ca7f08

Please sign in to comment.