store references to IO objects to prevent "Bad file descriptor - (Errno::EBADF)"
This commit is contained in:
parent
9c6888c044
commit
de6a01f297
@ -3,7 +3,7 @@ require 'mysql'
|
|||||||
class Mysql
|
class Mysql
|
||||||
def async_query(sql)
|
def async_query(sql)
|
||||||
send_query(sql)
|
send_query(sql)
|
||||||
select([IO.new(socket)],nil,nil,nil)
|
select [ (@sockets ||= {})[socket] ||= IO.new(socket) ], nil, nil, nil
|
||||||
get_result
|
get_result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user