From a3d72351d93cc89407df3470420179edd3604c30 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Mon, 4 Jul 2011 00:34:06 +0200 Subject: [PATCH] Stop all sesions when mpd frontend is asked to stop --- mopidy/frontends/mpd/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mopidy/frontends/mpd/__init__.py b/mopidy/frontends/mpd/__init__.py index 1e18f6e2..3e6080e5 100644 --- a/mopidy/frontends/mpd/__init__.py +++ b/mopidy/frontends/mpd/__init__.py @@ -5,6 +5,7 @@ from pykka.actor import ThreadingActor from mopidy import settings from mopidy.utils import network +from mopidy.utils.process import stop_actors_by_class from mopidy.frontends.mpd.dispatcher import MpdDispatcher from mopidy.frontends.mpd.protocol import ENCODING, VERSION, LINE_TERMINATOR @@ -40,6 +41,9 @@ class MpdFrontend(ThreadingActor): def on_receive(self, message): pass # Ignore state info that is sent to frontend. + def on_stop(self): + stop_actors_by_class(MpdSession) + class MpdSession(network.LineProtocol): """