Commit 899c46ac authored by Wandenberg's avatar Wandenberg

remove push_stream_shared_memory_cleanup_objects_ttl directive, using default...

remove push_stream_shared_memory_cleanup_objects_ttl directive, using default value 10s, and 4s for cleanup timer
parent 63dcebcc
h1(#changelog). Changelog h1(#changelog). Changelog
* Removed push_stream_shared_memory_cleanup_objects_ttl directive
* Changed push_stream_websocket directive to be a subtype of push_stream_subscriber directive * Changed push_stream_websocket directive to be a subtype of push_stream_subscriber directive
* Changed push_stream_eventsource_support directive to be a subtype of push_stream_subscriber directive * Changed push_stream_eventsource_support directive to be a subtype of push_stream_subscriber directive
* Fix to support gzip usage * Fix to support gzip usage
......
...@@ -106,7 +106,6 @@ h1(#directives). Directives ...@@ -106,7 +106,6 @@ h1(#directives). Directives
| "push_stream_publisher":push_stream_publisher |   x |   - |   - |   - |   - |   - | | "push_stream_publisher":push_stream_publisher |   x |   - |   - |   - |   - |   - |
| "push_stream_subscriber":push_stream_subscriber |   x |   - |   - |   - |   - |   - | | "push_stream_subscriber":push_stream_subscriber |   x |   - |   - |   - |   - |   - |
| "push_stream_shared_memory_size":push_stream_shared_memory_size |   - |   x |   - |   - |   - |   - | | "push_stream_shared_memory_size":push_stream_shared_memory_size |   - |   x |   - |   - |   - |   - |
| "push_stream_shared_memory_cleanup_objects_ttl":push_stream_shared_memory_cleanup_objects_ttl |   - |   x |   - |   - |   - |   - |
| "push_stream_channel_deleted_message_text":push_stream_channel_deleted_message_text |   - |   x |   - |   - |   - |   - | | "push_stream_channel_deleted_message_text":push_stream_channel_deleted_message_text |   - |   x |   - |   - |   - |   - |
| "push_stream_ping_message_text":push_stream_ping_message_text |   - |   x |   - |   - |   - |   - | | "push_stream_ping_message_text":push_stream_ping_message_text |   - |   x |   - |   - |   - |   - |
| "push_stream_channel_inactivity_time":push_stream_channel_inactivity_time |   - |   x |   - |   - |   - |   - | | "push_stream_channel_inactivity_time":push_stream_channel_inactivity_time |   - |   x |   - |   - |   - |   - |
...@@ -212,7 +211,6 @@ h1(#contributors). Contributors ...@@ -212,7 +211,6 @@ h1(#contributors). Contributors
[push_stream_publisher]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/publishers.textile#push_stream_publisher [push_stream_publisher]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/publishers.textile#push_stream_publisher
[push_stream_subscriber]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/subscribers.textile#push_stream_subscriber [push_stream_subscriber]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/subscribers.textile#push_stream_subscriber
[push_stream_shared_memory_size]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_shared_memory_size [push_stream_shared_memory_size]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_shared_memory_size
[push_stream_shared_memory_cleanup_objects_ttl]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_shared_memory_cleanup_objects_ttl
[push_stream_channel_deleted_message_text]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_channel_deleted_message_text [push_stream_channel_deleted_message_text]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_channel_deleted_message_text
[push_stream_ping_message_text]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_ping_message_text [push_stream_ping_message_text]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_ping_message_text
[push_stream_channel_inactivity_time]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_channel_inactivity_time [push_stream_channel_inactivity_time]https://github.com/wandenberg/nginx-push-stream-module/blob/master/docs/directives/main.textile#push_stream_channel_inactivity_time
......
...@@ -12,18 +12,6 @@ The size of the memory chunk this module will use to store published messages, c ...@@ -12,18 +12,6 @@ The size of the memory chunk this module will use to store published messages, c
When this memory is full any new request for publish a message or subscribe a channel will receive an 500 Internal Server Error response. When this memory is full any new request for publish a message or subscribe a channel will receive an 500 Internal Server Error response.
h2(#push_stream_shared_memory_cleanup_objects_ttl). push_stream_shared_memory_cleanup_objects_ttl <a name="push_stream_shared_memory_cleanup_objects_ttl" href="#">&nbsp;</a>
*syntax:* _push_stream_shared_memory_cleanup_objects_ttl time_
*default:* _30 seconds_
*context:* _http_
The length of time a message or a channel will stay on garbage collection area before it is completly discarded, freeing the shared memory. The minimum length is 30 seconds to ensure that no one is using these elements.
This operation is very important to help Nginx recycle memory consumed to create messages and channels, so do not use a large time.
h2(#push_stream_channel_deleted_message_text). push_stream_channel_deleted_message_text <a name="push_stream_channel_deleted_message_text" href="#">&nbsp;</a> h2(#push_stream_channel_deleted_message_text). push_stream_channel_deleted_message_text <a name="push_stream_channel_deleted_message_text" href="#">&nbsp;</a>
*syntax:* _push_stream_channel_deleted_message_text string_ *syntax:* _push_stream_channel_deleted_message_text string_
......
...@@ -50,8 +50,6 @@ typedef struct { ...@@ -50,8 +50,6 @@ typedef struct {
typedef struct { typedef struct {
ngx_flag_t enabled; ngx_flag_t enabled;
size_t shm_size; size_t shm_size;
ngx_msec_t memory_cleanup_interval;
time_t shm_cleanup_objects_ttl;
ngx_str_t channel_deleted_message_text; ngx_str_t channel_deleted_message_text;
time_t channel_inactivity_time; time_t channel_inactivity_time;
ngx_str_t ping_message_text; ngx_str_t ping_message_text;
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#define NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_SIZE 33554432 // 32 megs #define NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_SIZE 33554432 // 32 megs
#define NGX_HTTP_PUSH_STREAM_MESSAGE_BUFFER_CLEANUP_INTERVAL 5000 // 5 seconds #define NGX_HTTP_PUSH_STREAM_MESSAGE_BUFFER_CLEANUP_INTERVAL 5000 // 5 seconds
static time_t NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL = 10; // 10 seconds static time_t NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL = 10; // 10 seconds
static time_t NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_INTERVAL = 4000; // 2 seconds
static time_t NGX_HTTP_PUSH_STREAM_DEFAULT_MESSAGE_TTL = 1800; // 30 minutes static time_t NGX_HTTP_PUSH_STREAM_DEFAULT_MESSAGE_TTL = 1800; // 30 minutes
static time_t NGX_HTTP_PUSH_STREAM_DEFAULT_CHANNEL_INACTIVITY_TIME = 30; // 30 seconds static time_t NGX_HTTP_PUSH_STREAM_DEFAULT_CHANNEL_INACTIVITY_TIME = 30; // 30 seconds
......
...@@ -260,7 +260,7 @@ static void ngx_http_push_stream_buffer_timer_wake_handler(ngx_e ...@@ -260,7 +260,7 @@ static void ngx_http_push_stream_buffer_timer_wake_handler(ngx_e
static void ngx_http_push_stream_timer_set(ngx_msec_t timer_interval, ngx_event_t *event, ngx_event_handler_pt event_handler, ngx_flag_t start_timer); static void ngx_http_push_stream_timer_set(ngx_msec_t timer_interval, ngx_event_t *event, ngx_event_handler_pt event_handler, ngx_flag_t start_timer);
static void ngx_http_push_stream_timer_reset(ngx_msec_t timer_interval, ngx_event_t *timer_event); static void ngx_http_push_stream_timer_reset(ngx_msec_t timer_interval, ngx_event_t *timer_event);
#define ngx_http_push_stream_memory_cleanup_timer_set() ngx_http_push_stream_timer_set(ngx_http_push_stream_module_main_conf->memory_cleanup_interval, &ngx_http_push_stream_memory_cleanup_event, ngx_http_push_stream_memory_cleanup_timer_wake_handler, 1); #define ngx_http_push_stream_memory_cleanup_timer_set() ngx_http_push_stream_timer_set(NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_INTERVAL, &ngx_http_push_stream_memory_cleanup_event, ngx_http_push_stream_memory_cleanup_timer_wake_handler, 1);
#define ngx_http_push_stream_buffer_cleanup_timer_set(pslcf) ngx_http_push_stream_timer_set(NGX_HTTP_PUSH_STREAM_MESSAGE_BUFFER_CLEANUP_INTERVAL, &ngx_http_push_stream_buffer_cleanup_event, ngx_http_push_stream_buffer_timer_wake_handler, pslcf->store_messages); #define ngx_http_push_stream_buffer_cleanup_timer_set(pslcf) ngx_http_push_stream_timer_set(NGX_HTTP_PUSH_STREAM_MESSAGE_BUFFER_CLEANUP_INTERVAL, &ngx_http_push_stream_buffer_cleanup_event, ngx_http_push_stream_buffer_timer_wake_handler, pslcf->store_messages);
static void ngx_http_push_stream_worker_subscriber_cleanup_locked(ngx_http_push_stream_subscriber_t *worker_subscriber); static void ngx_http_push_stream_worker_subscriber_cleanup_locked(ngx_http_push_stream_subscriber_t *worker_subscriber);
......
...@@ -481,7 +481,7 @@ describe "Cleanup Memory" do ...@@ -481,7 +481,7 @@ describe "Cleanup Memory" do
it "should cleanup memory used after delete created channels with same id", :cleanup => true do it "should cleanup memory used after delete created channels with same id", :cleanup => true do
channel = 'ch_test_channel_cleanup_after_delete_same_id' channel = 'ch_test_channel_cleanup_after_delete_same_id'
body = 'message to create a channel' body = 'message to create a channel'
expected_time_for_clear = 10 expected_time_for_clear = 15
nginx_run_server(config.merge(:publisher_mode => 'admin'), :timeout => test_timeout) do |conf| nginx_run_server(config.merge(:publisher_mode => 'admin'), :timeout => test_timeout) do |conf|
published_messages_setp_1 = 0 published_messages_setp_1 = 0
......
...@@ -54,10 +54,6 @@ describe "Setup Parameters" do ...@@ -54,10 +54,6 @@ describe "Setup Parameters" do
nginx_test_configuration(config).should include("max number of broadcast channels cannot be smaller than value in push_stream_broadcast_channel_max_qtd") nginx_test_configuration(config).should include("max number of broadcast channels cannot be smaller than value in push_stream_broadcast_channel_max_qtd")
end end
it "should not accept a value less than '10s' as shared memory cleanup objects ttl" do
nginx_test_configuration({:shared_memory_cleanup_objects_ttl => '5s'}).should include("memory cleanup objects ttl cannot't be less than 10.")
end
it "should accept a configuration without http block" do it "should accept a configuration without http block" do
config = { config = {
:configuration_template => %q{ :configuration_template => %q{
......
...@@ -30,8 +30,6 @@ module NginxConfiguration ...@@ -30,8 +30,6 @@ module NginxConfiguration
:broadcast_channel_max_qtd => 3, :broadcast_channel_max_qtd => 3,
:broadcast_channel_prefix => 'broad_', :broadcast_channel_prefix => 'broad_',
:shared_memory_cleanup_objects_ttl => nil,
:subscriber_mode => nil, :subscriber_mode => nil,
:publisher_mode => nil, :publisher_mode => nil,
:padding_by_user_agent => nil, :padding_by_user_agent => nil,
...@@ -125,8 +123,6 @@ http { ...@@ -125,8 +123,6 @@ http {
<%= write_directive("push_stream_broadcast_channel_max_qtd", broadcast_channel_max_qtd) %> <%= write_directive("push_stream_broadcast_channel_max_qtd", broadcast_channel_max_qtd) %>
<%= write_directive("push_stream_broadcast_channel_prefix", broadcast_channel_prefix) %> <%= write_directive("push_stream_broadcast_channel_prefix", broadcast_channel_prefix) %>
<%= write_directive("push_stream_shared_memory_cleanup_objects_ttl", shared_memory_cleanup_objects_ttl) %>
<%= write_directive("push_stream_padding_by_user_agent", padding_by_user_agent) %> <%= write_directive("push_stream_padding_by_user_agent", padding_by_user_agent) %>
<%= write_directive("push_stream_authorized_channels_only", authorized_channels_only, "subscriber may create channels on demand or only authorized (publisher) may do it?") %> <%= write_directive("push_stream_authorized_channels_only", authorized_channels_only, "subscriber may create channels on demand or only authorized (publisher) may do it?") %>
......
...@@ -54,12 +54,6 @@ static ngx_command_t ngx_http_push_stream_commands[] = { ...@@ -54,12 +54,6 @@ static ngx_command_t ngx_http_push_stream_commands[] = {
NGX_HTTP_MAIN_CONF_OFFSET, NGX_HTTP_MAIN_CONF_OFFSET,
offsetof(ngx_http_push_stream_main_conf_t, shm_size), offsetof(ngx_http_push_stream_main_conf_t, shm_size),
NULL }, NULL },
{ ngx_string("push_stream_shared_memory_cleanup_objects_ttl"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
ngx_conf_set_sec_slot,
NGX_HTTP_MAIN_CONF_OFFSET,
offsetof(ngx_http_push_stream_main_conf_t, shm_cleanup_objects_ttl),
NULL },
{ ngx_string("push_stream_channel_deleted_message_text"), { ngx_string("push_stream_channel_deleted_message_text"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
ngx_conf_set_str_slot, ngx_conf_set_str_slot,
...@@ -417,8 +411,6 @@ ngx_http_push_stream_create_main_conf(ngx_conf_t *cf) ...@@ -417,8 +411,6 @@ ngx_http_push_stream_create_main_conf(ngx_conf_t *cf)
mcf->enabled = 0; mcf->enabled = 0;
mcf->shm_size = NGX_CONF_UNSET_SIZE; mcf->shm_size = NGX_CONF_UNSET_SIZE;
mcf->memory_cleanup_interval = NGX_CONF_UNSET_MSEC;
mcf->shm_cleanup_objects_ttl = NGX_CONF_UNSET;
mcf->channel_deleted_message_text.data = NULL; mcf->channel_deleted_message_text.data = NULL;
mcf->channel_inactivity_time = NGX_CONF_UNSET; mcf->channel_inactivity_time = NGX_CONF_UNSET;
mcf->ping_message_text.data = NULL; mcf->ping_message_text.data = NULL;
...@@ -448,7 +440,6 @@ ngx_http_push_stream_init_main_conf(ngx_conf_t *cf, void *parent) ...@@ -448,7 +440,6 @@ ngx_http_push_stream_init_main_conf(ngx_conf_t *cf, void *parent)
} }
ngx_conf_init_value(conf->message_ttl, NGX_HTTP_PUSH_STREAM_DEFAULT_MESSAGE_TTL); ngx_conf_init_value(conf->message_ttl, NGX_HTTP_PUSH_STREAM_DEFAULT_MESSAGE_TTL);
ngx_conf_init_value(conf->shm_cleanup_objects_ttl, NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL);
ngx_conf_init_size_value(conf->shm_size, NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_SIZE); ngx_conf_init_size_value(conf->shm_size, NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_SIZE);
ngx_conf_init_value(conf->channel_inactivity_time, NGX_HTTP_PUSH_STREAM_DEFAULT_CHANNEL_INACTIVITY_TIME); ngx_conf_init_value(conf->channel_inactivity_time, NGX_HTTP_PUSH_STREAM_DEFAULT_CHANNEL_INACTIVITY_TIME);
ngx_conf_merge_str_value(conf->channel_deleted_message_text, conf->channel_deleted_message_text, NGX_HTTP_PUSH_STREAM_CHANNEL_DELETED_MESSAGE_TEXT); ngx_conf_merge_str_value(conf->channel_deleted_message_text, conf->channel_deleted_message_text, NGX_HTTP_PUSH_STREAM_CHANNEL_DELETED_MESSAGE_TEXT);
...@@ -456,12 +447,6 @@ ngx_http_push_stream_init_main_conf(ngx_conf_t *cf, void *parent) ...@@ -456,12 +447,6 @@ ngx_http_push_stream_init_main_conf(ngx_conf_t *cf, void *parent)
ngx_conf_merge_str_value(conf->broadcast_channel_prefix, conf->broadcast_channel_prefix, NGX_HTTP_PUSH_STREAM_DEFAULT_BROADCAST_CHANNEL_PREFIX); ngx_conf_merge_str_value(conf->broadcast_channel_prefix, conf->broadcast_channel_prefix, NGX_HTTP_PUSH_STREAM_DEFAULT_BROADCAST_CHANNEL_PREFIX);
// sanity checks // sanity checks
// memory cleanup objects ttl cannot't be small
if (conf->shm_cleanup_objects_ttl < NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL) {
ngx_conf_log_error(NGX_LOG_ERR, cf, 0, "memory cleanup objects ttl cannot't be less than %d.", NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL);
return NGX_CONF_ERROR;
}
// max number of channels cannot be zero // max number of channels cannot be zero
if ((conf->max_number_of_channels != NGX_CONF_UNSET_UINT) && (conf->max_number_of_channels == 0)) { if ((conf->max_number_of_channels != NGX_CONF_UNSET_UINT) && (conf->max_number_of_channels == 0)) {
ngx_conf_log_error(NGX_LOG_ERR, cf, 0, "push_stream_max_number_of_channels cannot be zero."); ngx_conf_log_error(NGX_LOG_ERR, cf, 0, "push_stream_max_number_of_channels cannot be zero.");
...@@ -498,10 +483,6 @@ ngx_http_push_stream_init_main_conf(ngx_conf_t *cf, void *parent) ...@@ -498,10 +483,6 @@ ngx_http_push_stream_init_main_conf(ngx_conf_t *cf, void *parent)
return NGX_CONF_ERROR; return NGX_CONF_ERROR;
} }
// calc memory cleanup interval
ngx_uint_t interval = conf->shm_cleanup_objects_ttl / 10;
conf->memory_cleanup_interval = (interval * 1000) + 1000; // min 4 seconds (((30 / 10) * 1000) + 1000)
ngx_regex_compile_t *backtrack_parser = NULL; ngx_regex_compile_t *backtrack_parser = NULL;
u_char errstr[NGX_MAX_CONF_ERRSTR]; u_char errstr[NGX_MAX_CONF_ERRSTR];
......
...@@ -124,7 +124,7 @@ ngx_http_push_stream_delete_channels(ngx_http_push_stream_shm_data_t *data, ngx_ ...@@ -124,7 +124,7 @@ ngx_http_push_stream_delete_channels(ngx_http_push_stream_shm_data_t *data, ngx_
// go back one node on queue, since the current node will be removed // go back one node on queue, since the current node will be removed
cur_channel = prev_channel; cur_channel = prev_channel;
channel->expires = ngx_time() + ngx_http_push_stream_module_main_conf->shm_cleanup_objects_ttl; channel->expires = ngx_time() + NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL;
// move the channel to trash queue // move the channel to trash queue
ngx_queue_remove(&channel->queue); ngx_queue_remove(&channel->queue);
...@@ -722,7 +722,7 @@ ngx_http_push_stream_collect_expired_messages_and_empty_channels(ngx_http_push_s ...@@ -722,7 +722,7 @@ ngx_http_push_stream_collect_expired_messages_and_empty_channels(ngx_http_push_s
if (!channel->deleted) { if (!channel->deleted) {
channel->deleted = 1; channel->deleted = 1;
channel->expires = ngx_time() + ngx_http_push_stream_module_main_conf->shm_cleanup_objects_ttl; channel->expires = ngx_time() + NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL;
(channel->broadcast) ? NGX_HTTP_PUSH_STREAM_DECREMENT_COUNTER(data->broadcast_channels) : NGX_HTTP_PUSH_STREAM_DECREMENT_COUNTER(data->channels); (channel->broadcast) ? NGX_HTTP_PUSH_STREAM_DECREMENT_COUNTER(data->broadcast_channels) : NGX_HTTP_PUSH_STREAM_DECREMENT_COUNTER(data->channels);
// move the channel to trash queue // move the channel to trash queue
...@@ -883,7 +883,7 @@ ngx_http_push_stream_free_worker_message_memory_locked(ngx_slab_pool_t *shpool, ...@@ -883,7 +883,7 @@ ngx_http_push_stream_free_worker_message_memory_locked(ngx_slab_pool_t *shpool,
{ {
worker_msg->msg->workers_ref_count--; worker_msg->msg->workers_ref_count--;
if ((worker_msg->msg->workers_ref_count <= 0) && worker_msg->msg->deleted) { if ((worker_msg->msg->workers_ref_count <= 0) && worker_msg->msg->deleted) {
worker_msg->msg->expires = ngx_time() + ngx_http_push_stream_module_main_conf->shm_cleanup_objects_ttl; worker_msg->msg->expires = ngx_time() + NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL;
} }
ngx_queue_remove(&worker_msg->queue); ngx_queue_remove(&worker_msg->queue);
ngx_slab_free_locked(shpool, worker_msg); ngx_slab_free_locked(shpool, worker_msg);
...@@ -896,7 +896,7 @@ ngx_http_push_stream_mark_message_to_delete_locked(ngx_http_push_stream_msg_t *m ...@@ -896,7 +896,7 @@ ngx_http_push_stream_mark_message_to_delete_locked(ngx_http_push_stream_msg_t *m
ngx_http_push_stream_shm_data_t *data = (ngx_http_push_stream_shm_data_t *) ngx_http_push_stream_shm_zone->data; ngx_http_push_stream_shm_data_t *data = (ngx_http_push_stream_shm_data_t *) ngx_http_push_stream_shm_zone->data;
msg->deleted = 1; msg->deleted = 1;
msg->expires = ngx_time() + ngx_http_push_stream_module_main_conf->shm_cleanup_objects_ttl; msg->expires = ngx_time() + NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_OBJECTS_TTL;
ngx_queue_insert_tail(&data->messages_trash, &msg->queue); ngx_queue_insert_tail(&data->messages_trash, &msg->queue);
data->messages_in_trash++; data->messages_in_trash++;
} }
...@@ -974,7 +974,7 @@ static void ...@@ -974,7 +974,7 @@ static void
ngx_http_push_stream_memory_cleanup_timer_wake_handler(ngx_event_t *ev) ngx_http_push_stream_memory_cleanup_timer_wake_handler(ngx_event_t *ev)
{ {
ngx_http_push_stream_memory_cleanup(); ngx_http_push_stream_memory_cleanup();
ngx_http_push_stream_timer_reset(ngx_http_push_stream_module_main_conf->memory_cleanup_interval, &ngx_http_push_stream_memory_cleanup_event); ngx_http_push_stream_timer_reset(NGX_HTTP_PUSH_STREAM_DEFAULT_SHM_MEMORY_CLEANUP_INTERVAL, &ngx_http_push_stream_memory_cleanup_event);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment