Skip to content

Commit

Permalink
@client.wait is now in Server#run.
Browse files Browse the repository at this point in the history
This allows you to create a new instance of `Server` without blocking.
  • Loading branch information
sarahzrf committed Mar 29, 2014
1 parent b2345f8 commit a092f90
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/pry-remote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,6 @@ def initialize(object, host = DefaultHost, port = DefaultPort, options = {})

@client = PryRemote::Client.new
DRb.start_service uri, @client

puts "[pry-remote] Waiting for client on #{uri}"
@client.wait

puts "[pry-remote] Client received, starting remote session"
end

# Code that has to be called for Pry-remote to work properly
Expand Down Expand Up @@ -204,6 +199,10 @@ def teardown

# Actually runs pry-remote
def run
puts "[pry-remote] Waiting for client on #{uri}"
@client.wait

puts "[pry-remote] Client received, starting remote session"
setup

Pry.start(@object, @options.merge(:input => client.input_proxy, :output => client.output))
Expand Down

0 comments on commit a092f90

Please sign in to comment.