Commit 112d8b25 authored by AlexStocks's avatar AlexStocks

Imp: check array empty by its len

parent 747d21e3
...@@ -104,10 +104,6 @@ func (c *gettyRPCClient) selectSession() getty.Session { ...@@ -104,10 +104,6 @@ func (c *gettyRPCClient) selectSession() getty.Session {
c.lock.RLock() c.lock.RLock()
defer c.lock.RUnlock() defer c.lock.RUnlock()
if c.sessions == nil {
return nil
}
count := len(c.sessions) count := len(c.sessions)
if count == 0 { if count == 0 {
return nil return nil
......
Markdown is supported
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