Skip to content

Commit

Permalink
Invoke callback from within a Fiber when s2s connection fails, so any…
Browse files Browse the repository at this point in the history
… storage calls the callback makes block properly.
  • Loading branch information
dgraham committed Nov 30, 2011
1 parent 7880e28 commit 02201f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/vines/stream/server.rb
Expand Up @@ -35,7 +35,8 @@ def method_missing(name); self[name]; end

def self.connect(config, to, from, srv, callback)
if srv.empty?
callback.call(nil)
# fiber so storage calls work properly
Fiber.new { callback.call(nil) }.resume
else
begin
rr = srv.shift
Expand Down

0 comments on commit 02201f7

Please sign in to comment.