Index: Slim/Player/StreamingController.pm =================================================================== --- Slim/Player/StreamingController.pm (revision 24836) +++ Slim/Player/StreamingController.pm (working copy) @@ -1255,6 +1255,10 @@ return $_[0]->{'streamingState'} == STREAMING; } +sub isStreamout { + return $_[0]->{'streamingState'} == STREAMOUT; +} + sub isPaused { return $_[0]->{'playingState'} == PAUSED; } Index: Slim/Networking/Slimproto.pm =================================================================== --- Slim/Networking/Slimproto.pm (revision 24836) +++ Slim/Networking/Slimproto.pm (working copy) @@ -586,7 +586,23 @@ } } - if ($reason) { + if ($reason + + # bug 10475 + # Sometimes the player sends a DSCO with a non-zero reason code + # when it would seem that a normal disconnect at the end of the track + # is what has really happened. Quite why has not yet been determined. + # It would seem, from reports that this problem happens with both ip3k + # players and SqueezePlay, so it is probably something triggered by SC. + # It does not seem to be confined to a single operating-system platform. + # + # We ignore this non-zero code if our Controller is already in STREAMOUT + # state (which will only be the case for local tracks) + + && !$client->controller->isStreamout() + + ) + { # Report failure via protocol handler if available my $controller = $client->controller()->songStreamController(); if ($controller && $controller->isDirect() ) {