Skip to content

Commit

Permalink
program will crash if a UDP backend is removed #14
Browse files Browse the repository at this point in the history
  • Loading branch information
stou committed May 6, 2024
1 parent d82ebca commit f513f6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ func (b *UDPBackend) GetAddress() string {
func (b *UDPBackend) Close() {
err := b.udpConn.Close()
if err == nil {
zap.L().Info("Succeed to close udp backend", zap.String("address", b.udpConn.RemoteAddr().String()))
zap.L().Info("Succeed to close udp backend", zap.String("address", b.backendAddr.String() ))
} else {
zap.L().Error("Fail to close udp backend", zap.String("address", b.udpConn.RemoteAddr().String()))
zap.L().Error("Fail to close udp backend", zap.String("address", b.backendAddr.String() ))
}
}

Expand Down

0 comments on commit f513f6d

Please sign in to comment.