If there is an issue with setting up the test environment in this test,
pid is not set so stop_server kills the perl process. A guard has been
added to prevent this situation.
Fixes: #22014
Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22015)
$server_host = "127.0.0.1" if $server_host eq "0.0.0.0";
}
unless ($server_port > 0) {
- stop_server($server_name, $pid);
+ stop_server($server_name, $pid) if $pid;
print "Cannot get expected output from the $server_name server";
return 0;
}