Skip to content

Commit

Permalink
Merge pull request #71 from jphenow/master
Browse files Browse the repository at this point in the history
Try to connect to debugger for 15 seconds rather than failing
  • Loading branch information
csiszarattila committed Nov 10, 2012
2 parents cd2e725 + 41435e3 commit 3ea0a1b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/powder
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,16 @@ module Powder
Debugger.settings[:autoeval] = true
Debugger.settings[:autolist] = 1
Debugger.settings[:reload_source_on_change] = true
Debugger.start_client
connected = false
start = Time.now.to_i
while !connected && (start - Time.now.to_i) < 15
begin
Debugger.start_client && connected = true
rescue
next
end
end
say "Tried to connect for 15 seconds. Is the server ready for a debugger connection?" unless connected
end

desc "version", "Shows the version"
Expand Down

0 comments on commit 3ea0a1b

Please sign in to comment.