summaryrefslogtreecommitdiffhomepage
path: root/conn.go
diff options
context:
space:
mode:
Diffstat (limited to 'conn.go')
-rw-r--r--conn.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/conn.go b/conn.go
index d3919ca..fc503bf 100644
--- a/conn.go
+++ b/conn.go
@@ -58,6 +58,10 @@ func parseEndpoint(s string) (*net.UDPAddr, error) {
if err != nil {
return nil, err
}
+ ip4 := addr.IP.To4()
+ if ip4 != nil {
+ addr.IP = ip4
+ }
return addr, err
}