diff options
-rwxr-xr-x | clerk_rating_client | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clerk_rating_client b/clerk_rating_client index 20debc0..f846f3e 100755 --- a/clerk_rating_client +++ b/clerk_rating_client @@ -40,13 +40,14 @@ sub main { } sub subscribe_ratings_channel { + try { $mpd->close(); }; + $mpd->{socket}->close; $mpd->subscribe('rating'); } sub track_rating { while(1) { - try { $mpd->close(); }; - $mpd->{socket}->close; + subscribe_ratings_channel(); $mpd->idle('message'); my @blub = $mpd->read_messages; foreach (@blub) { |