mirror of https://github.com/golang/go.git
Prior to this CL we already shut down a jsonrpc2_v2.Conn when its Reader breaks, which we expect to be the common shutdown path. However, with certain kinds of connections (notably those over stdin+stdout), it is possible for the Writer side to fail while the Reader remains working. If the Writer has failed, we have no way to return the required Response messages for incoming calls, nor to write new Request messages of our own. Since we have no way to return a response, we will now mark those incoming calls as canceled. However, even if the Writer has failed we may still be able to read the responses for any outgoing calls that are already in flight. When our in-flight calls complete, we could in theory even continue to process Notification messages from the Reader; however, those are unlikely to be useful with half the connection broken. It seems more helpful — and less surprising — to go ahead and shut down the connection completely when it becomes idle. Updates golang/go#46520. Updates golang/go#49387. Change-Id: I713f172ca7031f4211da321560fe7eae57960a48 Reviewed-on: https://go-review.googlesource.com/c/tools/+/446315 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> |
||
|---|---|---|
| .. | ||
| analysisinternal | ||
| apidiff | ||
| bug | ||
| diff | ||
| event | ||
| facts | ||
| fakenet | ||
| fastwalk | ||
| fuzzy | ||
| gocommand | ||
| gopathwalk | ||
| goroot | ||
| imports | ||
| jsonrpc2 | ||
| jsonrpc2_v2 | ||
| loopclosure | ||
| memoize | ||
| packagesinternal | ||
| persistent | ||
| proxydir | ||
| stack | ||
| testenv | ||
| tool | ||
| typeparams | ||
| typesinternal | ||
| xcontext | ||