Refactor: return metadata.Addr only

This commit is contained in:
xjasonlyu
2022-04-03 23:16:36 +08:00
parent 8f97bda4f5
commit 9797cb31c0
3 changed files with 9 additions and 6 deletions
-3
View File
@@ -25,9 +25,6 @@ func (m *Metadata) SourceAddress() string {
}
func (m *Metadata) Addr() net.Addr {
if udpAddr := m.UDPAddr(); udpAddr != nil {
return udpAddr
}
return &Addr{metadata: m}
}