]> git.ktnx.net Git - mpd-feeder.git/commitdiff
connect to the DB early when in feeder mode
authorDamyan Ivanov <dmn@debian.org>
Thu, 11 Nov 2021 20:11:05 +0000 (20:11 +0000)
committerDamyan Ivanov <dmn@debian.org>
Thu, 11 Nov 2021 20:11:05 +0000 (20:11 +0000)
this way any problems in the connection will show at startup instead
of later when a new song needs to be queued

bin/mpd-feeder

index a170816bcfcc7acaf6ff3a07d0f7990534bd8edd..8644dde79e4b6addcbceaf71695e20f204c38f02 100755 (executable)
@@ -571,6 +571,8 @@ if (@ARGV) {
     }
 }
 
+$feeder->connect_db;
+
 for ( ;; ) {
     $feeder->queue_songs( undef, sub { $feeder->run } );