summaryrefslogtreecommitdiffstats
path: root/clerk_rating_client
diff options
context:
space:
mode:
Diffstat (limited to 'clerk_rating_client')
-rwxr-xr-xclerk_rating_client3
1 files changed, 3 insertions, 0 deletions
diff --git a/clerk_rating_client b/clerk_rating_client
index a00de29..20debc0 100755
--- a/clerk_rating_client
+++ b/clerk_rating_client
@@ -5,6 +5,7 @@ use v5.10;
use warnings;
use Array::Utils qw(:all);
#use DDP;
+use Try::Tiny;
use Config::Simple;
use File::Spec;
use strict;
@@ -44,6 +45,8 @@ sub subscribe_ratings_channel {
sub track_rating {
while(1) {
+ try { $mpd->close(); };
+ $mpd->{socket}->close;
$mpd->idle('message');
my @blub = $mpd->read_messages;
foreach (@blub) {