WIP: rebase fork onto upstream/main (v1.103.0) #15
@@ -894,6 +894,11 @@ func (i *jsIPN) listen(network, addr string) js.Value {
|
||||
if n == "tcp" {
|
||||
n = "tcp4"
|
||||
}
|
||||
// netstack.ListenTCP requires a full host:port; normalise the
|
||||
// standard net.Listen form ":port" that omits the host.
|
||||
if strings.HasPrefix(addr, ":") {
|
||||
addr = "0.0.0.0" + addr
|
||||
}
|
||||
ln, err := i.ns.ListenTCP(n, addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user