refactor: unnecessary guard check
This commit is contained in:
@@ -228,11 +228,9 @@ func (s *Session) UnSet(key string) {
|
|||||||
s.rwmutex.Lock()
|
s.rwmutex.Lock()
|
||||||
defer s.rwmutex.Unlock()
|
defer s.rwmutex.Unlock()
|
||||||
if s.Keys != nil {
|
if s.Keys != nil {
|
||||||
if _, exists := s.Keys[key]; exists {
|
|
||||||
delete(s.Keys, key)
|
delete(s.Keys, key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// IsClosed returns the status of the connection.
|
// IsClosed returns the status of the connection.
|
||||||
func (s *Session) IsClosed() bool {
|
func (s *Session) IsClosed() bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user