Fixes incorrect atomic usage

pull/8/head
Sean Sullivan 2018-04-03 17:20:46 -07:00
parent 6c96dfd81e
commit 4e877f5585
1 changed files with 1 additions and 1 deletions

View File

@ -399,7 +399,7 @@ func TestRoundTripRedirects(t *testing.T) {
var redirects int32 = 0
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
if redirects < test.redirects {
redirects = atomic.AddInt32(&redirects, 1)
atomic.AddInt32(&redirects, 1)
http.Redirect(w, req, "redirect", http.StatusFound)
return
}