From 6ad75d32c2389d3bfb358c60b77715db71c1f413 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 25 Aug 2013 22:40:08 +0000 Subject: player: fix logic around sink death/respawns We do not need a respawn flag, since we already infer expected vs unexpected sink death by checking the @targets array. Additionally, next_source must always check @current before calling, and not clobber the existing @current because that would cause two source processes writing into the same pipe. --- lib/dtas/player/client_handler.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/dtas/player') diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 44f0b57..e08d9a3 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -91,7 +91,6 @@ module DTAS::Player::ClientHandler # :nodoc: # do not reactivate it until we've reaped it if sink.pid drop_sink(sink) - sink.respawn = true else __sink_activate(sink) end @@ -375,7 +374,6 @@ module DTAS::Player::ClientHandler # :nodoc: def restart_pipeline return if @paused __current_requeue - @sinks.each_value { |sink| sink.respawn = sink.active } @targets.each { |t| drop_target(t) }.clear end -- cgit v1.2.3-24-ge0c7