Skip to content

Commit d945c3e

Browse files
committed
FIXUP: Add timeout option for pool:get()
Consider POOL_EMPTY_SLOT marker when closing a pool.
1 parent 9b17dbe commit d945c3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mysql/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ local function pool_close(self)
185185
self.usable = false
186186
for i = 1, self.size do
187187
local mysql_conn = self.queue:get()
188-
if mysql_conn ~= nil then
188+
if mysql_conn ~= POOL_EMPTY_SLOT then
189189
mysql_conn:close()
190190
end
191191
end

0 commit comments

Comments
 (0)