Hello!
On Mon, Nov 24, 2014 at 2:57 PM, bjoe2k4 wrote:
> I think i partially figured it out. The mysql server expects a COM_QUIT
> (0x01) packet from the client before closing the connection.
Hmm, I don't think the COM_QUIT packet is mandatory for closing the
MySQL connection. I've never seen any issues from MySQL 5.1 to 5.5.
What exact version of MySQL server are you using?
Also, I still think your Lua code has bugs, because nothing can stop
the client from closing the connection (even when the server is not
ready for that).
I've tried your code example on my side, that is, connecting to mysql
and then closing immediately without sending any queries, and the
mysql connection enters the TIME_WAIT state when the request finishes,
as expected:
$ netstat -nt|grep 3306
tcp 0 0 127.0.0.1:55106 127.0.0.1:3306
TIME_WAIT
Regards,
-agentzh