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
Branches
Tags
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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment