Revert "cancel context before waiting for waitgroup to avoid deadlock in RPC on error (#5345)" (#5360)

This reverts commit 9ff5b21a1e.
This commit is contained in:
ledgerwatch 2022-09-14 08:45:59 +01:00 committed by GitHub
parent 079b0d9074
commit 566cd65664
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,8 +241,8 @@ func (h *handler) handleMsg(msg *jsonrpcMessage, stream *jsoniter.Stream) {
// call goroutines to shut down.
func (h *handler) close(err error, inflightReq *requestOp) {
h.cancelAllRequests(err, inflightReq)
h.cancelRoot()
h.callWG.Wait()
h.cancelRoot()
h.cancelServerSubscriptions(err)
}