File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 8888local DEFAULTS = setmetatable ({
8989 connect_timeout = 100 ,
9090 read_timeout = 1000 ,
91- connection_options = nil , -- pool, etc
91+ connection_options = {} , -- pool, etc
9292 keepalive_timeout = 60000 ,
9393 keepalive_poolsize = 30 ,
9494
174174
175175
176176function _M .connect (self , params )
177- local params = tbl_copy_merge_defaults (params , DEFAULTS )
177+ local params = tbl_copy_merge_defaults (params , self . config )
178178
179179 if params .url then
180180 parse_dsn (params )
@@ -279,14 +279,15 @@ function _M.connect_to_host(self, host)
279279
280280 local ok , err
281281 local socket = host .socket
282+ local opts = self .connection_options
282283 if socket then
283- if self . connection_options then
284+ if opts then
284285 ok , err = r :connect (socket , self .connection_options )
285286 else
286287 ok , err = r :connect (socket )
287288 end
288289 else
289- if self . connection_options then
290+ if opts then
290291 ok , err = r :connect (host .host , host .port , self .connection_options )
291292 else
292293 ok , err = r :connect (host .host , host .port )
You can’t perform that action at this time.
0 commit comments