diff --git a/notifications/src/notifications/websocket_actor.rs b/notifications/src/notifications/websocket_actor.rs index 0575453..74edc6e 100644 --- a/notifications/src/notifications/websocket_actor.rs +++ b/notifications/src/notifications/websocket_actor.rs @@ -72,6 +72,15 @@ where /// impl Actor for WebsocketActor { type Context = ws::WebsocketContext; + + fn stopping(&mut self, ctx: &mut Self::Context) -> Running { + // Remove all references to this actor + self.subscription_manager.do_send(UnsubscribeAll { + me: ctx.address().recipient(), + }); + + Running::Stop + } } ///