mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
test: nginx: Adds timeout while listening for a socket.
This commit is contained in:
@@ -387,6 +387,9 @@ sub do_raw_request {
|
|||||||
) or msg("Failed to connect to localhost:$opt{p}: $@");
|
) or msg("Failed to connect to localhost:$opt{p}: $@");
|
||||||
return unless ($sock);
|
return unless ($sock);
|
||||||
|
|
||||||
|
my $timeo = pack("qq", 2, 0);
|
||||||
|
$sock->sockopt(SO_RCVTIMEO, $timeo);
|
||||||
|
|
||||||
# Join togeather the request
|
# Join togeather the request
|
||||||
my $r = join("", @_);
|
my $r = join("", @_);
|
||||||
dbg($r);
|
dbg($r);
|
||||||
@@ -777,7 +780,7 @@ sub nginx_start {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Look for startup msworker cycleg
|
# 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));
|
vrb(join(" ", map { quote_shell($_) } @p));
|
||||||
msg("Nginx server failed to start.");
|
msg("Nginx server failed to start.");
|
||||||
nginx_stop();
|
nginx_stop();
|
||||||
|
Reference in New Issue
Block a user