mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-23 09:55:06 +00:00
Merge pull request #5113 from paul-elliott-arm/ssl_opt_fixes_2.x
Backport 2.x : Ssl opt fixes
This commit is contained in:
commit
db77eaf2b4
|
@ -559,6 +559,8 @@ has_mem_err() {
|
||||||
# Wait for process $2 named $3 to be listening on port $1. Print error to $4.
|
# Wait for process $2 named $3 to be listening on port $1. Print error to $4.
|
||||||
if type lsof >/dev/null 2>/dev/null; then
|
if type lsof >/dev/null 2>/dev/null; then
|
||||||
wait_app_start() {
|
wait_app_start() {
|
||||||
|
newline='
|
||||||
|
'
|
||||||
START_TIME=$(date +%s)
|
START_TIME=$(date +%s)
|
||||||
if [ "$DTLS" -eq 1 ]; then
|
if [ "$DTLS" -eq 1 ]; then
|
||||||
proto=UDP
|
proto=UDP
|
||||||
|
@ -566,7 +568,15 @@ if type lsof >/dev/null 2>/dev/null; then
|
||||||
proto=TCP
|
proto=TCP
|
||||||
fi
|
fi
|
||||||
# Make a tight loop, server normally takes less than 1s to start.
|
# Make a tight loop, server normally takes less than 1s to start.
|
||||||
while ! lsof -a -n -b -i "$proto:$1" -p "$2" >/dev/null 2>/dev/null; do
|
while true; do
|
||||||
|
SERVER_PIDS=$(lsof -a -n -b -i "$proto:$1" -F p)
|
||||||
|
# When we use a proxy, it will be listening on the same port we
|
||||||
|
# are checking for as well as the server and lsof will list both.
|
||||||
|
# If multiple PIDs are returned, each one will be on a separate
|
||||||
|
# line, each prepended with 'p'.
|
||||||
|
case ${newline}${SERVER_PIDS}${newline} in
|
||||||
|
*${newline}p${2}${newline}*) break;;
|
||||||
|
esac
|
||||||
if [ $(( $(date +%s) - $START_TIME )) -gt $DOG_DELAY ]; then
|
if [ $(( $(date +%s) - $START_TIME )) -gt $DOG_DELAY ]; then
|
||||||
echo "$3 START TIMEOUT"
|
echo "$3 START TIMEOUT"
|
||||||
echo "$3 START TIMEOUT" >> $4
|
echo "$3 START TIMEOUT" >> $4
|
||||||
|
|
Loading…
Reference in a new issue