Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #53 from Rocky28447/master
Browse files Browse the repository at this point in the history
Fixed Aero side of infinite yield bug when nothing is bound to close callbacks
  • Loading branch information
Sleitnick authored Nov 12, 2018
2 parents d22d1be + d518045 commit e9d4339
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ServerStorage/Aero/Services/DataService.modulescript.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ function DataService:FlushAllConcurrent()
for _,cache in pairs(customCaches) do
numCaches = (numCaches + 1)
end
if (numCaches == 0) then return end
local function IncFlushed()
numFlushed = (numFlushed + 1)
if (numFlushed == numCaches) then
Expand Down Expand Up @@ -270,6 +271,7 @@ function DataService:Start()
local function FireBoundToCloseCallbacks()
local thread = coroutine.running()
local numBinded = #boundToCloseFuncs
if (numBinded == 0) then return end
local numCompleted = 0
local maxWait = 20
local start = tick()
Expand Down Expand Up @@ -330,4 +332,4 @@ function DataService:Init()
end


return DataService
return DataService

0 comments on commit e9d4339

Please sign in to comment.