Thanks to visit codestin.com
Credit goes to github.com

Skip to content

开启http_cache=true 会触发panic #509

@bbaobelief

Description

@bbaobelief

问题

服务端开启http_cache=true,访问域名解析地址会触发panic

#cache
http_cache=true
http_cache_length=100

版本

[root@instance-tw conf]# nps -version
Version: 0.26.6
Core version: 0.26.0

错误

Apr 15 12:04:43 instance-tw nps: panic: runtime error: invalid memory address or nil pointer dereference
Apr 15 12:04:43 instance-tw nps: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x98fe99]
Apr 15 12:04:43 instance-tw nps: goroutine 67 [running]:
Apr 15 12:04:43 instance-tw nps: ehang.io/nps/server/proxy.(*httpServer).handleHttp.func2(0xc00018a730, 0xc00018a70d, 0xc000198e00, 0xc0001f6780, 0xc0004d76d0, 0xc0000c8f30, 0xc0004d76d8)
Apr 15 12:04:43 instance-tw nps: /home/travis/gopath/src/github.com/ehang-io/nps/server/proxy/http.go:184 +0x1b9
Apr 15 12:04:43 instance-tw nps: created by ehang.io/nps/server/proxy.(*httpServer).handleHttp
Apr 15 12:04:43 instance-tw nps: /home/travis/gopath/src/github.com/ehang-io/nps/server/proxy/http.go:169 +0xb12
Apr 15 12:04:43 instance-tw systemd: Nps.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 15 12:04:43 instance-tw systemd: Unit Nps.service entered failed state.
Apr 15 12:04:43 instance-tw systemd: Nps.service failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions