Closed anzdaddy closed 3 years ago
The following code uses a bare string as a context key. This is a bug.
https://github.com/samuong/alpaca/blob/8ac2ded38992c1795572fe4aba38eafaed7521c7/proxyfinder_test.go#L35
https://github.com/samuong/alpaca/blob/7d23c7f4fa7937c229d0cf5fe65a77d0dfa54abb/proxy.go#L41
Also, as per @anzdaddy's comment on #16: "https://golang.org/pkg/sync/atomic/#AddUint64 would be simpler, probably faster and won't leak a goroutine."
While there, may as well fix that too.
The following code uses a bare string as a context key. This is a bug.
https://github.com/samuong/alpaca/blob/8ac2ded38992c1795572fe4aba38eafaed7521c7/proxyfinder_test.go#L35
https://github.com/samuong/alpaca/blob/7d23c7f4fa7937c229d0cf5fe65a77d0dfa54abb/proxy.go#L41