Skip to content
This repository was archived by the owner on Nov 30, 2019. It is now read-only.

Commit 556dad4

Browse files
committed
fix(eventmodule): bind the event manager in singleton scope
Otherwise inversify would create a new EventManager for each request
1 parent 0fb26a0 commit 556dad4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/container/modules/EventModule.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { EventManager } from '../../event/EventManager';
55
export class EventModule extends ContainerModule {
66
constructor() {
77
super((bind) => {
8-
bind(ContainerConstants.SYSTEMS.EVENT.EVENTMANAGER).to(EventManager);
8+
bind(
9+
ContainerConstants.SYSTEMS.EVENT.EVENTMANAGER,
10+
).to(EventManager).inSingletonScope();
911
});
1012
}
1113
}

0 commit comments

Comments
 (0)