Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
9e08be7b
Commit
9e08be7b
authored
Jan 04, 2021
by
Jedrzej Potoniec
Committed by
Nathaniel Wesley Filardo
Jan 05, 2021
Browse files
httpserver: fix memory leak
There was a memory leak related to not dropping all references to fifosock's ssend.
parent
c695a451
Changes
1
Show whitespace changes
Inline
Side-by-side
lua_modules/http/httpserver.lua
View file @
9e08be7b
...
...
@@ -86,19 +86,22 @@ do
local
buf
=
""
local
method
,
url
local
ondisconnect
=
function
(
connection
)
connection
:
on
(
"receive"
,
nil
)
connection
:
on
(
"disconnection"
,
nil
)
connection
:
on
(
"sent"
,
nil
)
collectgarbage
(
"collect"
)
end
local
cfini
=
function
()
conn
:
on
(
"receive"
,
nil
)
conn
:
on
(
"disconnection"
,
nil
)
csend
(
function
()
conn
:
on
(
"sent"
,
nil
)
conn
:
close
()
ondisconnect
(
conn
)
end
)
end
local
ondisconnect
=
function
(
connection
)
connection
:
on
(
"sent"
,
nil
)
collectgarbage
(
"collect"
)
end
-- header parser
local
cnt_len
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment