mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
增加rpc client状态判断
This commit is contained in:
@@ -70,6 +70,12 @@ type ClientCodec interface {
|
||||
Close() error
|
||||
}
|
||||
|
||||
func (client *Client) IsClosed() bool {
|
||||
client.reqMutex.Lock()
|
||||
defer client.reqMutex.Unlock()
|
||||
return client.shutdown || client.closing
|
||||
}
|
||||
|
||||
func (client *Client) send(call *Call, queueMode bool) {
|
||||
client.reqMutex.Lock()
|
||||
defer client.reqMutex.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user