Skip to content

Commit

Permalink
fix mysql2 defer logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanfei Shen committed Oct 24, 2011
1 parent 39954ed commit 3448059
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/em-synchrony/mysql2.rb
Expand Up @@ -7,6 +7,18 @@
module Mysql2
module EM
class Client
module Watcher
def notify_readable
detach
begin
result = @client.async_result
rescue Exception => e
@deferable.fail(e)
else
@deferable.succeed(result)
end
end
end

alias :aquery :query
def query(sql, opts={})
Expand Down

0 comments on commit 3448059

Please sign in to comment.