Validate player is still there.
They could have logged off, we should stop processing if so.
This commit is contained in:
parent
78ae2804a1
commit
bcc40d76fc
6
init.lua
6
init.lua
@ -113,6 +113,12 @@ local function send_request(request_type, player, context)
|
|||||||
timeout = 15,
|
timeout = 15,
|
||||||
}, function(res)
|
}, function(res)
|
||||||
assert(res.completed)
|
assert(res.completed)
|
||||||
|
if not player then
|
||||||
|
-- the player could have logged off
|
||||||
|
minetest.log("verbose", "player left, discarding packet result from mt2fa server")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if not res.succeeded then
|
if not res.succeeded then
|
||||||
-- major problem, retry
|
-- major problem, retry
|
||||||
minetest.log("error", "mt2fa: server replied with an error code")
|
minetest.log("error", "mt2fa: server replied with an error code")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user