mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Raise server-side error on database timeout
This commit is contained in:
@@ -85,6 +85,7 @@ local function onPlayerConnecting(name, _, deferrals)
|
||||
while databasePromise.state == 0 do -- while database promise is pending
|
||||
if os.clock() - databaseTime > 30 then -- if 30 seconds were spent waiting for the database
|
||||
deferrals.done(Lang:t('error.connecting_database_timeout'))
|
||||
error(Lang:t('error.connecting_database_timeout'))
|
||||
break
|
||||
end
|
||||
Wait(1000)
|
||||
|
||||
Reference in New Issue
Block a user