mirror of
https://github.com/golang/go
synced 2024-11-18 10:54:40 -07:00
479cc23432
When jsonrpc2.Serve times out or is cancelled, we leak the goroutine that is accepting connections, because it is stuck trying to write its error back to the doneListening channel. Fix this by adding a context cancellation for the serve func, and selecting on this context when writing the error. Change-Id: I3383535f58b44616983816e8b257a975e3c337a7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/229978 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com> |
||
---|---|---|
.. | ||
analysisinternal | ||
apidiff | ||
event | ||
fastwalk | ||
gocommand | ||
gopathwalk | ||
imports | ||
jsonrpc2 | ||
lsp | ||
memoize | ||
packagesinternal | ||
proxydir | ||
span | ||
testenv | ||
tool | ||
xcontext |