Skip to content

Commit

Permalink
more verbose drb attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp committed Feb 15, 2010
1 parent 2b52a9d commit fb30c8d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/redcar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def self.try_to_load_via_drb

begin
begin
TCPSocket.new('127.0.0.1', 9999).close
TCPSocket.new('127.0.0.1', port).close
rescue Errno::ECONNREFUSED
# no other instance running...
return
end

drb = DRbObject.new(nil, "druby://127.0.0.1:9999")
puts 'attempting to load via drb'
drb = DRbObject.new(nil, "druby://127.0.0.1:#{port}")

if ARGV.any?
ARGV.each do |arg|
Expand All @@ -87,13 +87,13 @@ def self.try_to_load_via_drb
else
return unless drb.open_item_drb('just_bring_to_front')
end
return true
puts 'success'
true
rescue Exception => e
puts e.class.to_s + ": " + e.message
puts e.backtrace
# fall through and continue anyway
false
end
false
end

def self.ensure_jruby
Expand Down

0 comments on commit fb30c8d

Please sign in to comment.