Skip to content
Snippets Groups Projects
Commit c8bfd004 authored by scott.wang's avatar scott.wang
Browse files

simple the client validate method

parent 5d7b0519
No related branches found
No related tags found
No related merge requests found
......@@ -634,12 +634,8 @@ func (c *Client) Valid() bool {
default:
}
c.lock.RLock()
if c.rawClient == nil {
c.lock.RUnlock()
return false
}
c.lock.RUnlock()
return true
defer c.lock.RUnlock()
return c.rawClient != nil
}
// Done
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment