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:
parent
3c3d1ad199
commit
64da2da6fb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user