mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 15:33:12 +09:00
Decouple SubscriptionController from Controller
Remove the reliance a reference to the Controller to get the link that a subscription is tied to by explicitly handling the SubscriptionRequest and passing the link to the SubscriptionController.
This commit is contained in:
1 parent
1d729adbb7
commit
4439691695
4 files changed
+44
-35
No files matched your search
@@ -76,7 +76,7 @@ export default class Controller {
|
||||
private _events: events.EventEmitter = new events.EventEmitter();
|
||||
|
||||
/** Event subscription controller */
|
||||
subscriptions: lib.SubscriptionController;
|
||||
subscriptions = new lib.SubscriptionController();
|
||||
|
||||
// Possible states are new, starting, running, stopping, stopped
|
||||
private _state: string = "new";
|
||||
@@ -148,7 +148,6 @@ export default class Controller {
|
||||
this.app.locals.streams = new Map();
|
||||
|
||||
this.wsServer = new WsServer(this);
|
||||
this.subscriptions = new lib.SubscriptionController(this);
|
||||
|
||||
this.modStore.on("change", mod => {
|
||||
this.modsUpdated([mod]);
|
||||
|
||||
Reference in new issue
Block a user