mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
test: nginx: Adds timeout while listening for a socket.
This commit is contained in:
parent
215042af21
commit
8314791c9e
@ -387,6 +387,9 @@ sub do_raw_request {
|
||||
) or msg("Failed to connect to localhost:$opt{p}: $@");
|
||||
return unless ($sock);
|
||||
|
||||
my $timeo = pack("qq", 2, 0);
|
||||
$sock->sockopt(SO_RCVTIMEO, $timeo);
|
||||
|
||||
# Join togeather the request
|
||||
my $r = join("", @_);
|
||||
dbg($r);
|
||||
@ -777,7 +780,7 @@ sub nginx_start {
|
||||
}
|
||||
|
||||
# Look for startup msworker cycleg
|
||||
unless (defined match_log("error", qr/setproctitle: "nginx: worker process"/, 60, "worker cycle")) {
|
||||
unless (defined match_log("error", qr/start worker process/, 60)) {
|
||||
vrb(join(" ", map { quote_shell($_) } @p));
|
||||
msg("Nginx server failed to start.");
|
||||
nginx_stop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user