mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-21 18:22:37 +02:00
Remove duplicated code
This commit is contained in:
parent
54dc78aab8
commit
f72e852ccb
@ -401,16 +401,6 @@ func (c *Client) closeConn(id string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) onDisconnect() {
|
|
||||||
c.listenerMutex.Lock()
|
|
||||||
defer c.listenerMutex.Unlock()
|
|
||||||
|
|
||||||
if c.onDisconnectListener == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
c.onDisconnectListener()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) notifyDisconnected() {
|
func (c *Client) notifyDisconnected() {
|
||||||
c.listenerMutex.Lock()
|
c.listenerMutex.Lock()
|
||||||
defer c.listenerMutex.Unlock()
|
defer c.listenerMutex.Unlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user