openresty / lua-resty-mysql

Nonblocking Lua MySQL driver library for ngx_lua or OpenResty
708 stars 236 forks source link

why not call sock::close when read timeout like redis.lua did? #71

Open yyqbuct opened 6 years ago

yyqbuct commented 6 years ago

why not call sock::close when read timeout like redis.lua did?

In redis.lua,the connection pool was destroyed when read timeout happens

SHA-1: c75af8fe7f71ca05e4bd3ccb3923f6a81d62a67a bugfix: the memcached connection might enter a bad state when read timeout happens because ngx_lua's cosocket reading calls no longer automatically close the connection in this case.

so my question is why did not treat this as a bug in mysql.lua

thanks

agentzh commented 6 years ago

@yyqbuct Seems like we need to port that fix over too. Pull requests welcome!