Commit 4e877f55 authored by Sean Sullivan's avatar Sean Sullivan

Fixes incorrect atomic usage

parent 6c96dfd8
...@@ -399,7 +399,7 @@ func TestRoundTripRedirects(t *testing.T) { ...@@ -399,7 +399,7 @@ func TestRoundTripRedirects(t *testing.T) {
var redirects int32 = 0 var redirects int32 = 0
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
if redirects < test.redirects { if redirects < test.redirects {
redirects = atomic.AddInt32(&redirects, 1) atomic.AddInt32(&redirects, 1)
http.Redirect(w, req, "redirect", http.StatusFound) http.Redirect(w, req, "redirect", http.StatusFound)
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment