Hold node-ports for publicIPs for local IPs

This commit is contained in:
Tim Hockin
2015-08-17 23:05:05 -07:00
parent f5a9281a26
commit 5087ae6c93
2 changed files with 51 additions and 10 deletions

View File

@@ -46,7 +46,11 @@ type proxySocket interface {
}
func newProxySocket(protocol api.Protocol, ip net.IP, port int) (proxySocket, error) {
host := ip.String()
host := ""
if ip != nil {
host = ip.String()
}
switch strings.ToUpper(string(protocol)) {
case "TCP":
listener, err := net.Listen("tcp", net.JoinHostPort(host, strconv.Itoa(port)))