Skip to content

Commit 5c00e8f

Browse files
fix for missing network when guessing socket type
Signed-off-by: Achille Roussel <[email protected]>
1 parent 15368a9 commit 5c00e8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wasip1/net_wasip1.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ func family(addr net.Addr) int {
4545

4646
func socketType(addr net.Addr) (int, error) {
4747
switch addr.Network() {
48-
case "tcp", "unix":
48+
case "tcp", "tcp4", "tcp6", "unix":
4949
return SOCK_STREAM, nil
50-
case "udp", "unixgram":
50+
case "udp", "udp4", "udp6", "unixgram":
5151
return SOCK_DGRAM, nil
5252
default:
5353
return -1, syscall.EPROTOTYPE

0 commit comments

Comments
 (0)