Skip to content
Permalink
Browse files

http2: don't add *Response to activeRes in Transport on Headers.END_S…

…TREA

Prevents a memory leak.

Tests (to be updated) in Go standard library.

Updates golang/go#14084

Change-Id: I3ff602a013bb8fda7a17bccb31beadb08421ae6a
Reviewed-on: https://go-review.googlesource.com/19134
Reviewed-by: Blake Mizerany <blake.mizerany@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
  • Loading branch information...
bradfitz committed Feb 1, 2016
1 parent d513e58 commit 644ffc06205c045a7d696b9a212191615d30b77b
Showing with 1 addition and 1 deletion.
  1. +1 −1 http2/transport.go
@@ -1264,10 +1264,10 @@ func (rl *clientConnReadLoop) processHeaderBlockFragment(frag []byte, streamID u
res.ContentLength = -1
res.Body = &gzipReader{body: res.Body}
}
rl.activeRes[cs.ID] = cs
}

cs.resTrailer = &res.Trailer
rl.activeRes[cs.ID] = cs
cs.resc <- resAndError{res: res}
rl.nextRes = nil // unused now; will be reset next HEADERS frame
return nil

0 comments on commit 644ffc0

Please sign in to comment.
You can’t perform that action at this time.