Added handling of watchdog for serving bigger files
This commit is contained in:
@@ -23,6 +23,7 @@ return function (connection, req, args)
|
|||||||
connection:send(chunk)
|
connection:send(chunk)
|
||||||
bytesSent = bytesSent + #chunk
|
bytesSent = bytesSent + #chunk
|
||||||
chunk = nil
|
chunk = nil
|
||||||
|
tmr.wdclr() -- loop can take a while for long files. tmr.wdclr() prevent watchdog to restart module
|
||||||
--print("Sent" .. args.file, bytesSent)
|
--print("Sent" .. args.file, bytesSent)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user