Remove unnecessary nil checks
This commit is contained in:
parent
c21c2da690
commit
6d16afc65c
|
@ -888,9 +888,6 @@ func (s *Server) KeyManagerLAN() *serf.KeyManager {
|
|||
|
||||
// KeyManagerWAN returns the WAN Serf keyring manager
|
||||
func (s *Server) KeyManagerWAN() *serf.KeyManager {
|
||||
if s.serfWAN == nil {
|
||||
return nil
|
||||
}
|
||||
return s.serfWAN.KeyManager()
|
||||
}
|
||||
|
||||
|
|
|
@ -116,9 +116,6 @@ func (r *Router) Shutdown() {
|
|||
|
||||
// AddArea registers a new network area with the router.
|
||||
func (r *Router) AddArea(areaID types.AreaID, cluster RouterSerfCluster, pinger Pinger, useTLS bool) error {
|
||||
if cluster == nil {
|
||||
return nil
|
||||
}
|
||||
r.Lock()
|
||||
defer r.Unlock()
|
||||
|
||||
|
|
Loading…
Reference in New Issue