diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2015-07-03 12:32:40 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2015-07-11 14:36:16 +0000 |
| commit | f96fa06d14dfb41d987ae5372084e593ac535b13 (patch) | |
| tree | dbac4da1269cde0624386d3ec9b0f7948d728d40 /src/net/http | |
| parent | b3a8b0574ad94c0b26cacb2e926848f18ecb29f3 (diff) | |
| download | go-f96fa06d14dfb41d987ae5372084e593ac535b13.tar.xz | |
net/http/fcgi: fix race between serveRequest and cleanUp
Fixes #11552
Change-Id: I87904e9e3fb4bd1fb4c7075a4e2d0151e5bd37df
Reviewed-on: https://go-review.googlesource.com/11890
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/fcgi/child.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/http/fcgi/child.go b/src/net/http/fcgi/child.go index aba71cd5c1..da824ed717 100644 --- a/src/net/http/fcgi/child.go +++ b/src/net/http/fcgi/child.go @@ -289,6 +289,8 @@ func (c *child) serveRequest(req *request, body io.ReadCloser) { } func (c *child) cleanUp() { + c.mu.Lock() + defer c.mu.Unlock() for _, req := range c.requests { if req.pw != nil { // race with call to Close in c.serveRequest doesn't matter because |
