diff --git a/[core]/es_extended/client/modules/callback.lua b/[core]/es_extended/client/modules/callback.lua index 30211b9a..b0dca393 100644 --- a/[core]/es_extended/client/modules/callback.lua +++ b/[core]/es_extended/client/modules/callback.lua @@ -102,7 +102,7 @@ function ESX.AwaitServerCallback(eventName, ...) -- if the server callback takes longer than 15 seconds to respond, reject the promise SetTimeout(15000, function() - if p.state == "pending" then + if p.state == 0 then p:reject("Server Callback Timed Out") end end) diff --git a/[core]/es_extended/server/modules/callback.lua b/[core]/es_extended/server/modules/callback.lua index c0fa8f73..b29347ea 100644 --- a/[core]/es_extended/server/modules/callback.lua +++ b/[core]/es_extended/server/modules/callback.lua @@ -107,7 +107,7 @@ function ESX.AwaitClientCallback(player, eventName, ...) if not p then return end SetTimeout(15000, function() - if p.state == "pending" then + if p.state == 0 then p:reject("Server Callback Timed Out") end end)