Skip to content

Commit

Permalink
Partial conversion to rbzmq
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvc committed Aug 24, 2010
1 parent 980eaca commit 1252b93
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/dripdrop/handlers.rb
Expand Up @@ -44,12 +44,15 @@ def on_readable(mode, block)
@thread = Thread.new do
begin
while message = @socket.recv
if mode == :parse
block.call(DripDrop::Message.parse(message))
else
block.call(message)
EM::Deferrable.future(message) do |message|
puts 'recvd'
if mode == :parse
block.call(DripDrop::Message.parse(message))
else
block.call(message)
end
end
end
end
rescue Exception => e
puts e.inspect
end
Expand Down

0 comments on commit 1252b93

Please sign in to comment.