proxypool icon indicating copy to clipboard operation
proxypool copied to clipboard

Fix: panic on accessing nil error

Open vicxqh opened this issue 4 years ago • 1 comments

panic 1

goroutine 83 [running]:
github.com/henson/proxypool/getter.IP89(0x0, 0x0, 0x0)
	/Users/vicxiao/workspace/go/github/proxypool/getter/89ip.go:27 +0x453
main.run.func1(0xc0002ba1e0, 0xc0002a6480, 0x4768f98)

sample output after fix

2020/05/07 11:36:45 [ WARN] failed to get proxies from 89ip, http status: 503, error: <nil>

panic 2

2020/05/07 11:37:32 http: panic serving [::1]:53613: runtime error: invalid memory address or nil pointer dereference
goroutine 208 [running]:
...
	/Users/vicxiao/workspace/go/github/proxypool/pkg/storage/filter.go:90 +0xc6
github.com/henson/proxypool/api.ProxyHandler(0x4818d40, 0xc000158620, 0xc0002a0f00)

sample output after fix

2020/05/07 11:44:55 [ WARN] failed to get random ip, len(ips) 0, error <nil>

BTW, I could not get any proxy to use.

vicxqh avatar May 07 '20 03:05 vicxqh

这需要更新代码才能使用。。最近换工作了,没有更新它。。。

sndnvaps avatar May 07 '20 14:05 sndnvaps