From fba04b17d7f256e5e83e61673d69a88c2748e9ac Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 26 Aug 2013 08:53:39 +0000 Subject: client_handler: remove redundant checks for @current.pid @current is only set if is active with a pid, now, so all of our checks for @current.pid are redundant and confusing. --- lib/dtas/player/client_handler.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 40825a0..c346973 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@ -199,7 +199,7 @@ module DTAS::Player::ClientHandler # :nodoc: end def __current_requeue - return unless @current && @current.pid + return unless @current # no need to requeue if we're already due to die return if @current.requeued @@ -341,7 +341,7 @@ module DTAS::Player::ClientHandler # :nodoc: def do_play # no echo, next_source will echo on new track @paused = false - return if @current && @current.pid + return if @current next_source(@queue.shift) end @@ -350,7 +350,7 @@ module DTAS::Player::ClientHandler # :nodoc: end def do_seek(io, offset) - if @current && @current.pid + if @current if @current.respond_to?(:infile) begin if offset.sub!(/\A\+/, '') -- cgit v1.2.3-24-ge0c7