fix router receiving

This commit is contained in:
Astazium 2026-09-23 22:16:47 +03:00 • committed by GitHub
parent 102ee55183
commit ed7f935578
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -243,7 +243,7 @@ local HttpRequest = {__index={
}} }}
network.http_open = function(port, handler, timeout_ms) network.http_open = function(port, handler, timeout_ms)
if type(handler) ~= "function" then if handler == nil then
error "http server cannot be opened without a request handler" error "http server cannot be opened without a request handler"
end end
local socket = setmetatable({id=http_open(port, timeout_ms or 60000)}, ServerSocket) local socket = setmetatable({id=http_open(port, timeout_ms or 60000)}, ServerSocket)