Fix a memory leak when the connection is dropped by the client side

This commit is contained in:
Anton Andersen 2016-02-15 12:46:54 +03:00
parent 8715123904
commit 1ddd47eaf9

View File

@ -153,6 +153,12 @@ return function (port)
connection:on("receive", onReceive)
connection:on("sent", onSent)
connection:on("disconnection",function(c)
if connectionThread then
connectionThread = nil
collectgarbage()
end
end)
end
)