소스 검색

Added handling of watchdog for serving bigger files

IntelliDust 8 년 전
부모
커밋
1b8a1f7750
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      httpserver-static.lua

+ 1 - 0
httpserver-static.lua

@@ -23,6 +23,7 @@ return function (connection, req, args)
          connection:send(chunk)
          bytesSent = bytesSent + #chunk
          chunk = nil
+         tmr.wdclr() -- loop can take a while for long files. tmr.wdclr() prevent watchdog to restart module
          --print("Sent" .. args.file, bytesSent)
       end
    end