Handle the null write case
This commit is contained in:
parent
9fee6ee8e8
commit
f852959fa5
@ -18,9 +18,9 @@ return function (port)
|
|||||||
|
|
||||||
local function startServing(fileServeFunction, connection, req, args)
|
local function startServing(fileServeFunction, connection, req, args)
|
||||||
local bufferedConnection = {}
|
local bufferedConnection = {}
|
||||||
connectionThread = coroutine.create(function(fileServeFunction, connection, req, args)
|
connectionThread = coroutine.create(function(fileServeFunction, bconnection, req, args)
|
||||||
fileServeFunction(connection, req, args)
|
fileServeFunction(bconnection, req, args)
|
||||||
if not connection:flush() then
|
if not bconnection:flush() then
|
||||||
connection:close()
|
connection:close()
|
||||||
connectionThread = nil
|
connectionThread = nil
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user