1
0
mirror of https://github.com/golang/go synced 2024-11-18 17:54:57 -07:00

internal/lsp: fix the debug info pages

There was a dealock introduced in cl/190737 on all the internal structure
debug pages.
The object getters all protect with the mutex already, it should not also
be done in the outer Render function

Change-Id: I5c85dc8e2ec489e59ca5a80128f2649dd7753983
Reviewed-on: https://go-review.googlesource.com/c/tools/+/205165
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Ian Cottrell 2019-11-04 17:59:33 -05:00
parent 3c3d1ad199
commit 64da2da6fb

View File

@ -248,8 +248,6 @@ func Serve(ctx context.Context, addr string) error {
func Render(tmpl *template.Template, fun func(*http.Request) interface{}) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
mu.Lock()
defer mu.Unlock()
var data interface{}
if fun != nil {
data = fun(r)