[Tarantool-patches] [PATCH] Fix take a task after disconnect
Leonid Vasiliev
lvasiliev at tarantool.org
Mon Dec 16 11:33:45 MSK 2019
https://github.com/tarantool/queue/issues/104
https://github.com/tarantool/queue/tree/lvasiliev/gh-queue-104-take-task-after-disconnect
---
queue/abstract.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/queue/abstract.lua b/queue/abstract.lua
index ad8817d..e5cfa39 100644
--- a/queue/abstract.lua
+++ b/queue/abstract.lua
@@ -94,7 +94,9 @@ function tube.take(self, timeout)
conds[fid]:free()
box.space._queue_consumers:delete{ sid, fid }
- task = self.raw:take()
+ if session.exists(sid) then
+ task = self.raw:take()
+ end
if task ~= nil then
return self.raw:normalize_task(task)
--
2.17.1
More information about the Tarantool-patches
mailing list