On some machines "sibridge localhost" results in the error message "too many colons in address ::1:20081" whenever a command is issued. The culprit seems to be message/peer_connection.go:Peer() which uses LookupIP() and simply uses the first returned address. The same coding pattern occurs elsewhere I'm sure.
Fix this by creating a function util.Resolve(addr) which takes an addr with or without port and replaces the host part with its IP address. If an IPv4 address is available, it uses that. Otherwise it uses an IPv6 address properly encapsulated in square brackets [...].
From mux2...@gmail.com on August 19, 2013 12:24:52
On some machines "sibridge localhost" results in the error message "too many colons in address ::1:20081" whenever a command is issued. The culprit seems to be message/peer_connection.go:Peer() which uses LookupIP() and simply uses the first returned address. The same coding pattern occurs elsewhere I'm sure.
Fix this by creating a function util.Resolve(addr) which takes an addr with or without port and replaces the host part with its IP address. If an IPv4 address is available, it uses that. Otherwise it uses an IPv6 address properly encapsulated in square brackets [...].
Original issue: http://code.google.com/p/go-susi/issues/detail?id=138