[Slim-Checkins] r15406 - /trunk/server/Slim/Networking/Slimproto.pm

andy at svn.slimdevices.com andy at svn.slimdevices.com
Mon Dec 17 15:46:42 PST 2007


Author: andy
Date: Mon Dec 17 15:46:42 2007
New Revision: 15406

URL: http://svn.slimdevices.com?rev=15406&view=rev
Log:
Fixed a case where failed direct streams would not report to the protocol handler, causing playback to stop if you're listening to Pandora for example

Modified:
    trunk/server/Slim/Networking/Slimproto.pm

Modified: trunk/server/Slim/Networking/Slimproto.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Networking/Slimproto.pm?rev=15406&r1=15405&r2=15406&view=diff
==============================================================================
--- trunk/server/Slim/Networking/Slimproto.pm (original)
+++ trunk/server/Slim/Networking/Slimproto.pm Mon Dec 17 15:46:42 2007
@@ -584,6 +584,15 @@
 	$log->info("Squeezebox got disconnection on the data channel: $reasons{$reason}");
 
 	if ($reason) {
+		# Report failure via protocol handler if available
+		if ( my $url = $client->directURL ) {
+			my $handler = Slim::Player::ProtocolHandlers->handlerForURL($url);
+			if ( $handler && $handler->can("handleDirectError") ) {
+				$handler->handleDirectError( $client, $url, $reason, $reasons{$reason} );
+				return;
+			}
+		}
+		
 		$client->failedDirectStream( $reasons{$reason} );
 	}
 }



More information about the checkins mailing list