Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
Disable thread joining.
Fixed log coloring not applying based on level.
  • Loading branch information
bkacjios committed Mar 21, 2023
1 parent d8c629d commit 6107ffc
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions launcher/downloader/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ end

function downloader.close()
requests_channel:push(false)
if THREAD:isRunning() then
THREAD:wait()
end
end

return downloader
3 changes: 0 additions & 3 deletions source/modules/downloader/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ end

function downloader.close()
requests_channel:push(false)
if THREAD:isRunning() then
THREAD:wait()
end
end

return downloader
2 changes: 1 addition & 1 deletion source/modules/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ for level, info in pairs(log.levels) do
local filter = log.levels[log.level].priority
local stamp = function()
local date = os.date(log.date_format)
log.print(format("[%s%-5s\27[0m - %s] ", "\27[35m", level:upper(), date))
log.print(format("[%s%-5s\27[0m - %s] ", info.color, level:upper(), date))
end
log[level] = function(text, ...)
if info.priority < filter then return end
Expand Down
3 changes: 0 additions & 3 deletions source/modules/web/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ end

function web.close()
requests_channel:push(false) -- false ends the thread loop
if THREAD:isRunning() then
THREAD:wait()
end
end

return web

0 comments on commit 6107ffc

Please sign in to comment.