mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
redis driver: unlock before assert failed
This commit is contained in:
@@ -155,8 +155,8 @@ function command:batch(mode)
|
||||
allok = allok and ok
|
||||
allret[i] = ret
|
||||
end
|
||||
assert(allok, "batch read failed")
|
||||
socket.unlock(self.__handle)
|
||||
assert(allok, "batch read failed")
|
||||
self.__mode = false
|
||||
return allret
|
||||
else
|
||||
|
||||
@@ -142,7 +142,6 @@ function socket.accept(id)
|
||||
end
|
||||
|
||||
function socket.close(fd)
|
||||
-- socket.lock(fd)
|
||||
local s = socket_pool[id]
|
||||
if s == nil then
|
||||
return
|
||||
@@ -154,6 +153,7 @@ function socket.close(fd)
|
||||
if s.buffer then
|
||||
driver.clear(s.buffer)
|
||||
end
|
||||
assert(s.lock_set == nil or next(s.lock_set) == nil)
|
||||
socket_pool[id] = nil
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user