mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-28 01:17:03 +08:00
riot use get_free_port to fix issue on windows
This commit is contained in:
parent
2ffc0e38f4
commit
deec5c9b05
|
@ -168,12 +168,7 @@ run_sshl()
|
|||
# treat as a port number
|
||||
arg=localhost:$arg
|
||||
fi
|
||||
while
|
||||
local port=$(shuf -n 1 -i 49152-65535)
|
||||
netstat -atun | grep -q "$port"
|
||||
do
|
||||
continue
|
||||
done
|
||||
local port=$(get_free_port)
|
||||
|
||||
SSH_OPTIONS="$SSH_OPTIONS -NC -L $port:$arg"
|
||||
local cmd="$(prepare_ssh_cmd ssh)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user