Skip to content

Commit

Permalink
Adding two more lingering_ config options
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Beaulieu committed Jan 21, 2021
1 parent 888a74b commit 96c9d28
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
$client_body_timeout = $nginx::client_body_timeout
$send_timeout = $nginx::send_timeout
$lingering_timeout = $nginx::lingering_timeout
$lingering_close = $nginx::lingering_close
$lingering_time = $nginx::lingering_time
$etag = $nginx::etag
$events_use = $nginx::events_use
$debug_connections = $nginx::debug_connections
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
$client_body_timeout = '60s',
$send_timeout = '60s',
$lingering_timeout = '5s',
Optional[String] $lingering_close = undef,
Optional[String] $lingering_time = undef,
Optional[Enum['on', 'off']] $etag = undef,
Optional[String] $events_use = undef,
Array[Nginx::DebugConnection] $debug_connections = [],
Expand Down
12 changes: 12 additions & 0 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,18 @@
value: '963',
match: ' send_timeout 963;'
},
{
title: 'should set lingering_close',
attr: 'lingering_close',
value: 'always',
match: ' lingering_close always;'
},
{
title: 'should set lingering_time',
attr: 'lingering_time',
value: '30s',
match: ' lingering_time 30s;'
},
{
title: 'should set lingering_timeout',
attr: 'lingering_timeout',
Expand Down
6 changes: 6 additions & 0 deletions templates/conf.d/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ http {
keepalive_requests <%= @keepalive_requests %>;
client_body_timeout <%= @client_body_timeout %>;
send_timeout <%= @send_timeout %>;
<% if @lingering_close -%>
lingering_close <%= @lingering_close %>;
<% end -%>
<% if @lingering_time -%>
lingering_time <%= @lingering_time %>;
<% end -%>
lingering_timeout <%= @lingering_timeout %>;
tcp_nodelay <%= @http_tcp_nodelay %>;

Expand Down

0 comments on commit 96c9d28

Please sign in to comment.