Skip to content

Commit

Permalink
Resolve IPv4 addresses only for now.
Browse files Browse the repository at this point in the history
Makes Go 1.5 happy, and fixes globalsign#153.
  • Loading branch information
niemeyer committed Aug 21, 2015
1 parent 3569c88 commit f4923a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (cluster *mongoCluster) server(addr string, tcpaddr *net.TCPAddr) *mongoSer

func resolveAddr(addr string) (*net.TCPAddr, error) {
// This hack allows having a timeout on resolution.
conn, err := net.DialTimeout("udp", addr, 10*time.Second)
conn, err := net.DialTimeout("udp4", addr, 10*time.Second)
if err != nil {
log("SYNC Failed to resolve server address: ", addr)
return nil, errors.New("failed to resolve server address: " + addr)
Expand Down

0 comments on commit f4923a5

Please sign in to comment.