Skip to content

Commit

Permalink
Check wg stats error on cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lixmal committed Jan 16, 2024
1 parent 25d036a commit f0e5498
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/internal/peer/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,9 @@ func (conn *Conn) cleanup() error {
// todo rethink status updates
log.Debugf("error while updating peer's %s state, err: %v", conn.config.Key, err)
}
conn.statusRecorder.UpdateWireguardPeerState(conn.config.Key, iface.WGStats{})
if err := conn.statusRecorder.UpdateWireguardPeerState(conn.config.Key, iface.WGStats{}); err != nil {
log.Debugf("failed to reset wireguard stats for peer %s: %s", conn.config.Key, err)
}

log.Debugf("cleaned up connection to peer %s", conn.config.Key)
if err1 != nil {
Expand Down

0 comments on commit f0e5498

Please sign in to comment.