Loading...
This site is best viewed in a modern browser with JavaScript enabled.
Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.
attempt to receive data on a closed socket:
comsenabler
With stream-lua-nginx-module how to keep socket open for more requests
while true
do
local data = "">
ngx.say(data)
end
This gives error
2019/02/09 16:53:10 [error] 7842#0: *1 attempt to receive data on a closed socket:
zchao1995
Hello!
Just respects the second return value of sock:receive, it specifies whether some errors happened.
When some errors occurred, just breaks this loop.
BTW, you should also check the return value of ngx.say.