Skip to content

Commit 665471f

Browse files
committed
fix: add mixxing context to BroadcastService
1 parent 22dd42e commit 665471f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/src/modules/broadcast/BroadcastService.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const { AdvancedBase } = require("@heyputer/putility");
2020
const BaseService = require("../../services/BaseService");
2121
const { CLink } = require("./connection/CLink");
2222
const { SLink } = require("./connection/SLink");
23+
const { Context } = require("../../util/context");
2324

2425
class BroadcastService extends BaseService {
2526
static MODULES = {
@@ -96,7 +97,10 @@ class BroadcastService extends BaseService {
9697
}
9798

9899
meta.from_outside = true;
99-
svc_event.emit(key, data, meta);
100+
const context = Context.get(undefined, { allow_fallback: true });
101+
context.arun(async () => {
102+
await svc_event.emit(key, data, meta);
103+
});
100104
});
101105
});
102106

0 commit comments

Comments
 (0)