AP_Scripting: webserver improvements

This commit is contained in:
Andrew Tridgell 2023-12-07 18:55:02 +11:00
parent a4fb05de95
commit 26d814880e
1 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ if not sock_listen:bind("0.0.0.0", WEB_BIND_PORT:get()) then
return return
end end
if not sock_listen:listen(1) then if not sock_listen:listen(20) then
gcs:send_text(MAV_SEVERITY.ERROR, "WebServer: failed to listen") gcs:send_text(MAV_SEVERITY.ERROR, "WebServer: failed to listen")
return return
end end
@ -682,7 +682,7 @@ end
see if any new clients want to connect see if any new clients want to connect
--]] --]]
local function check_new_clients() local function check_new_clients()
while true do while sock_listen:pollin(0) do
local sock = sock_listen:accept() local sock = sock_listen:accept()
if not sock then if not sock then
return return