gyre icon indicating copy to clipboard operation
gyre copied to clipboard

Invalid port * after host

Open omani opened this issue 5 years ago • 3 comments

hi there, with the new golang version (and its built in url lib):

if !n.bound {
		_, n.port, err = bind(n.inbox, "tcp://*:*")
		if err != nil {
			return err
		}
		n.bound = true
	}

in node.go does not work anymore.

my workaround was to say:

if !n.bound {
		_, n.port, err = bind(n.inbox, "tcp://*:0")
		if err != nil {
			return err
		}
		n.bound = true
	}

in node.go

and:

	if p == "0" {
...

in node.go later. instead of if p == "*".

fyi.

omani avatar Oct 17 '19 18:10 omani

I had the same issue and the changes suggested by @omani fixes it. According to the net/url docs:

validOptionalPort reports whether port is either an empty string or matches /^:\d*$/

@omani can you do a pull request or should I?

aeroblue avatar Nov 13 '19 16:11 aeroblue

yeah will do.

omani avatar Nov 15 '19 00:11 omani

done.

omani avatar Jan 24 '20 16:01 omani