This commit is contained in:
crusader 2017-10-31 20:49:11 +09:00
parent fe46dad193
commit ed8218b164

View File

@ -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) { func rpcWriter(c *client, pendingRequests map[interface{}]*CallState, pendingRequestsLock *sync.Mutex, stopChan <-chan struct{}, writerDone chan<- error) {