Fix typo
This commit is contained in:
parent
d68dfc75f9
commit
f24d6e908b
@ -31,7 +31,7 @@ return function (port)
|
|||||||
fileServeFunction(bufferedConnection, req, args)
|
fileServeFunction(bufferedConnection, req, args)
|
||||||
-- The bufferedConnection may still hold some data that hasn't been sent. Flush it before closing.
|
-- The bufferedConnection may still hold some data that hasn't been sent. Flush it before closing.
|
||||||
if not bufferedConnection:flush() then
|
if not bufferedConnection:flush() then
|
||||||
log(connection, "closing connetion", "no (more) data")
|
log(connection, "closing connection", "no (more) data")
|
||||||
connection:close()
|
connection:close()
|
||||||
connectionThread = nil
|
connectionThread = nil
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
@ -43,7 +43,7 @@ return function (port)
|
|||||||
local status, err = coroutine.resume(connectionThread, fileServeFunction, bufferedConnection, req, args)
|
local status, err = coroutine.resume(connectionThread, fileServeFunction, bufferedConnection, req, args)
|
||||||
if not status then
|
if not status then
|
||||||
log(connection, "Error: "..err)
|
log(connection, "Error: "..err)
|
||||||
log(connection, "closing connetion", "error")
|
log(connection, "closing connection", "error")
|
||||||
connection:close()
|
connection:close()
|
||||||
connectionThread = nil
|
connectionThread = nil
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
@ -149,14 +149,14 @@ return function (port)
|
|||||||
local status, err = coroutine.resume(connectionThread)
|
local status, err = coroutine.resume(connectionThread)
|
||||||
if not status then
|
if not status then
|
||||||
log(connection, "Error: "..err)
|
log(connection, "Error: "..err)
|
||||||
log(connection, "closing connetion", "error")
|
log(connection, "closing connection", "error")
|
||||||
connection:close()
|
connection:close()
|
||||||
connectionThread = nil
|
connectionThread = nil
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
end
|
end
|
||||||
elseif connectionThreadStatus == "dead" then
|
elseif connectionThreadStatus == "dead" then
|
||||||
-- We're done sending file.
|
-- We're done sending file.
|
||||||
log(connection, "closing connetion","thread is dead")
|
log(connection, "closing connection","thread is dead")
|
||||||
connection:close()
|
connection:close()
|
||||||
connectionThread = nil
|
connectionThread = nil
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user