Skip to content

Commit

Permalink
Fixed memory leak with the notifications server
Browse files Browse the repository at this point in the history
  • Loading branch information
ComprosoftCEO committed Dec 23, 2021
1 parent 800080e commit 4007a01
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions notifications/src/notifications/websocket_actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ where
///
impl Actor for WebsocketActor {
type Context = ws::WebsocketContext<Self>;

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
}
}

///
Expand Down

0 comments on commit 4007a01

Please sign in to comment.