Skip to content

Commit

Permalink
fix: remove broker when event callback
Browse files Browse the repository at this point in the history
  • Loading branch information
teogl committed Mar 13, 2023
1 parent 7fbfe4c commit c43ce68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/microservice/package.json
@@ -1,6 +1,6 @@
{
"name": "@addapptables/microservice",
"version": "2.0.0",
"version": "2.0.1",
"description": "addapptables microservice",
"author": "dev@addapptables.com",
"homepage": "https://github.com/addapptables/miscellaneous#readme",
Expand Down
Expand Up @@ -33,11 +33,11 @@ export class BrokerService implements OnModuleDestroy {
private subscribe = async (data: ITransferData<TransferDataDto>) => {
const brokers = Broker.getInstance();
const handle = brokers.get(data.cid);
brokers.delete(data.cid);
if (typeof handle !== 'function') {
return;
}
await handle(data);
brokers.delete(data.cid);
};

start(): IBrokerStart {
Expand Down

0 comments on commit c43ce68

Please sign in to comment.