Skip to content

Commit 5d2d038

Browse files
committed
Merge pull request #400 from simi/avoid_warning
Initialize read_timeout
2 parents f0303a3 + b9e30bc commit 5d2d038

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mysql2/client.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Mysql2
22
class Client
3-
attr_reader :query_options
3+
attr_reader :query_options, :read_timeout
44
@@default_query_options = {
55
:as => :hash, # the type of object you want each row back as; also supports :array (an array of values)
66
:async => false, # don't wait for a result after sending the query, you'll have to monitor the socket yourself then eventually call Mysql2::Client#async_result
@@ -15,6 +15,7 @@ class Client
1515

1616
def initialize(opts = {})
1717
opts = Mysql2::Util.key_hash_as_symbols( opts )
18+
@read_timeout = nil
1819
@query_options = @@default_query_options.dup
1920
@query_options.merge! opts
2021

0 commit comments

Comments
 (0)