Skip to content

Commit

Permalink
Fix self.packet_no bug
Browse files Browse the repository at this point in the history
Mentioned by this issue openresty/openresty#212
Maybe better fix with one line
  • Loading branch information
Your Name committed Apr 22, 2018
1 parent 0670f3e commit 3296eb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/resty/mysql.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ end
local function _send_packet(self, req, size)
local sock = self.sock

self.packet_no = self.packet_no + 1
-- self.packet_no = self.packet_no + 1
self.packet_no = (self.packet_no < 255 and self.packet_no + 1) or 1

-- print("packet no: ", self.packet_no)

Expand Down

0 comments on commit 3296eb8

Please sign in to comment.