From ed8218b164088fb0798dfd01cadf79ffdf3a5d3f Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 31 Oct 2017 20:49:11 +0900 Subject: [PATCH] ing --- client/client.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/client.go b/client/client.go index 4a4d77f..d2aabf1 100644 --- a/client/client.go +++ b/client/client.go @@ -198,6 +198,14 @@ func handleRPC(c *client) { } } + for _, cs := range pendingRequests { + atomic.AddUint32(&c.pendingRequestsCount, ^uint32(0)) + cs.Error = err + if cs.DoneChan != nil { + cs.done() + } + } + } func rpcWriter(c *client, pendingRequests map[interface{}]*CallState, pendingRequestsLock *sync.Mutex, stopChan <-chan struct{}, writerDone chan<- error) {