Fix client RPC stream close mutex (#1643)
This commit is contained in:
		| @@ -130,15 +130,15 @@ func (r *rpcStream) Error() error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func (r *rpcStream) Close() error { | func (r *rpcStream) Close() error { | ||||||
| 	r.RLock() | 	r.Lock() | ||||||
|  |  | ||||||
| 	select { | 	select { | ||||||
| 	case <-r.closed: | 	case <-r.closed: | ||||||
| 		r.RUnlock() | 		r.Unlock() | ||||||
| 		return nil | 		return nil | ||||||
| 	default: | 	default: | ||||||
| 		close(r.closed) | 		close(r.closed) | ||||||
| 		r.RUnlock() | 		r.Unlock() | ||||||
|  |  | ||||||
| 		// send the end of stream message | 		// send the end of stream message | ||||||
| 		if r.sendEOS { | 		if r.sendEOS { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user