From 5b472f355454b91e3486a3a16413a6bd6d2bb895 Mon Sep 17 00:00:00 2001 From: Marcos Kirsch Date: Sat, 28 Feb 2015 16:39:40 -0600 Subject: [PATCH] Add yield so that looong listings don't overflow mcu's buffer --- http/file_list.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/http/file_list.lua b/http/file_list.lua index e8bc675..8f334e3 100644 --- a/http/file_list.lua +++ b/http/file_list.lua @@ -12,6 +12,8 @@ return function (connection, args) local url = string.match(name, ".*/(.*)") if isHttpFile then connection:send('
  • ' .. url .. " (" .. size .. " bytes)
  • \n") + -- this list could be very long, so we'll yield in order to avoid overflowing the send buffer. + coroutine.yield() end end