mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-14 10:50:45 +01:00
Fix log with tags
This commit is contained in:
parent
01e7caf640
commit
3d81a0a07d
@ -97,12 +97,12 @@ func (p *Peer) CloseGracefully(ctx context.Context) {
|
|||||||
p.connMu.Lock()
|
p.connMu.Lock()
|
||||||
_, err := p.writeWithTimeout(ctx, messages.MarshalCloseMsg())
|
_, err := p.writeWithTimeout(ctx, messages.MarshalCloseMsg())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("failed to send close message to peer: %s", p.String())
|
p.log.Errorf("failed to send close message to peer: %s", p.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
err = p.conn.Close()
|
err = p.conn.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("failed to close connection to peer: %s", err)
|
p.log.Errorf("failed to close connection to peer: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
defer p.connMu.Unlock()
|
defer p.connMu.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user