Skip to content

read_eof function should check if socke is a reqeust socket. #9

@anyfeel

Description

@anyfeel

should also check if sock is req-socket in read_eof function, for
get_body_reader will call read_eof function in line 720, and if state is read_eof, it will try to setkeepalive on a req-socket which is forbidden. the runtime error traceback like below:

2018/04/12 16:30:50 [error] 30699#0: *2621 lua entry thread aborted: runtime error: /home/vagrant/shanks/nginx//app/lib/resty/httpipe.lua:516: attempt to call method 'setkeepalive' (a nil value)
stack traceback:
coroutine 0:
        /home/vagrant/shanks/nginx//app/lib/resty/httpipe.lua: in function 'set_keepalive'
        /home/vagrant/shanks/nginx//app/lib/resty/httpipe.lua:549: in function 'read'
        /home/vagrant/shanks/nginx//app/lib/resty/httpipe.lua:730: in function 'reader'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions