diff --git a/src/ReplicatedStorage/Aero/Shared/Event.modulescript.lua b/src/ReplicatedStorage/Aero/Shared/Event.modulescript.lua index 71904b5..f682241 100644 --- a/src/ReplicatedStorage/Aero/Shared/Event.modulescript.lua +++ b/src/ReplicatedStorage/Aero/Shared/Event.modulescript.lua @@ -39,6 +39,7 @@ local CO_RUNNING = coroutine.running local CO_YIELD = coroutine.yield local CO_RESUME = coroutine.resume local BLANK_FUNC = function() end +local ASSERT = assert local Event = {} @@ -80,7 +81,7 @@ function Event:Wait() local connection connection = self:Connect(function(...) connection:Disconnect() - CO_RESUME(thread, ...) + ASSERT(CO_RESUME(thread, ...)) end) return CO_YIELD() end diff --git a/src/ServerStorage/Aero/Modules/DataStoreCache.modulescript.lua b/src/ServerStorage/Aero/Modules/DataStoreCache.modulescript.lua index eb60f3a..3ad61d8 100644 --- a/src/ServerStorage/Aero/Modules/DataStoreCache.modulescript.lua +++ b/src/ServerStorage/Aero/Modules/DataStoreCache.modulescript.lua @@ -108,7 +108,7 @@ function Cache:FlushAllConcurrent() self:Flush(key, true) numFlushed = (numFlushed + 1) if (numFlushed == numData) then - coroutine.resume(thread) + assert(coroutine.resume(thread)) end end) end diff --git a/src/ServerStorage/Aero/Services/DataService.modulescript.lua b/src/ServerStorage/Aero/Services/DataService.modulescript.lua index 2ce5145..e49a764 100644 --- a/src/ServerStorage/Aero/Services/DataService.modulescript.lua +++ b/src/ServerStorage/Aero/Services/DataService.modulescript.lua @@ -225,7 +225,7 @@ function DataService:FlushAllConcurrent() local function IncFlushed() numFlushed = (numFlushed + 1) if (numFlushed == numCaches) then - coroutine.resume(thread) + assert(coroutine.resume(thread)) end end for player,cache in pairs(playerCaches) do @@ -280,7 +280,7 @@ function DataService:Start() pcall(func) numCompleted = (numCompleted + 1) if (numCompleted == numBinded) then - coroutine.resume(thread) + assert(coroutine.resume(thread)) end end)() end diff --git a/src/StarterPlayer/StarterPlayerScripts/Aero/Controllers/Fade.modulescript.lua b/src/StarterPlayer/StarterPlayerScripts/Aero/Controllers/Fade.modulescript.lua index 965162a..fca9864 100644 --- a/src/StarterPlayer/StarterPlayerScripts/Aero/Controllers/Fade.modulescript.lua +++ b/src/StarterPlayer/StarterPlayerScripts/Aero/Controllers/Fade.modulescript.lua @@ -244,7 +244,7 @@ function Fade:FromTo(fromTransparency, toTransparency, duration, async) end if (async) then - coroutine.resume(coroutine.create(AwaitEnd)) + coroutine.wrap(AwaitEnd)() else AwaitEnd() end