mirror of
https://github.com/tinygo-org/net.git
synced 2026-08-16 18:53:26 +00:00
BUG Fix: use port :80 if server.Addr is empty
This commit is contained in:
committed by
deadprogram
parent
7898c5e946
commit
d939a800a7
@@ -88,6 +88,11 @@ func ResolveTCPAddr(network, address string) (*TCPAddr, error) {
|
|||||||
return nil, fmt.Errorf("Network '%s' not supported", network)
|
return nil, fmt.Errorf("Network '%s' not supported", network)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch address {
|
||||||
|
case ":http":
|
||||||
|
address = ":80"
|
||||||
|
}
|
||||||
|
|
||||||
// TINYGO: Use netdev resolver
|
// TINYGO: Use netdev resolver
|
||||||
|
|
||||||
host, sport, err := SplitHostPort(address)
|
host, sport, err := SplitHostPort(address)
|
||||||
|
|||||||
Reference in New Issue
Block a user