Skip to content

Commit

Permalink
重构mysql组件
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyoo0812 committed Sep 18, 2023
1 parent 4851d20 commit 64f07f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/driver/mysql.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ function MysqlDB:check_alive()
thread_mgr:entry(self:address(), function()
local channel = makechan("check mysql")
for _, sock in pairs(self.connections) do
sock:close()
channel:push(function()
return self:login(sock)
end)
Expand All @@ -137,6 +136,7 @@ function MysqlDB:login(socket)
end
local ok, res = self:auth(socket)
if not ok then
socket:close()
self:delive(socket)
log_err("[MysqlDB][login] auth db(%s:%s:%s) auth failed! because: %s", ip, port, id, res)
return false
Expand Down

0 comments on commit 64f07f2

Please sign in to comment.