Skip to content

Commit bffb16f

Browse files
authored
fix(port): no error is reported if the port is occupied (#113)
1 parent 38f8c02 commit bffb16f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/util/port.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func portOccupied(port int) error {
13-
ln, err := net.Listen("tcp", ":"+strconv.Itoa(port))
13+
ln, err := net.Listen("tcp4", ":"+strconv.Itoa(port))
1414
if err != nil {
1515
return fmt.Errorf("port %d is occupied, %v", port, err)
1616
}

0 commit comments

Comments
 (0)