Skip to content

Commit beafd42

Browse files
committed
improve regtest.sh linux port check
1 parent b2013e0 commit beafd42

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

regtest.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ _is_port_bound() {
2323
local port=$1
2424
case "$(uname)" in
2525
"Linux")
26-
[ -n "$(ss -HOlnt "sport = :$port")" ] && return 0
26+
[ -n "$(ss -HOant "sport = :$port")" ] && return 0
27+
ss -Oant "sport = :$port"
28+
return 1
2729
;;
2830
"Darwin")
2931
lsof -i "tcp:${port}" -sTCP:LISTEN -t >/dev/null && return 0

0 commit comments

Comments
 (0)