Update write_http.c
authorloginator17 <loginator17@users.noreply.github.com>
Mon, 27 Oct 2014 13:00:04 +0000 (13:00 +0000)
committerloginator17 <loginator17@users.noreply.github.com>
Mon, 27 Oct 2014 13:00:04 +0000 (13:00 +0000)
Changing default post timeout to plugin's interval and fixing low speed interval to use correct method for plugin interval (plugin_get_interval())

src/write_http.c

index b36a697..a48cdf3 100644 (file)
@@ -607,7 +607,12 @@ static int wh_config_url (oconfig_item_t *ci) /* {{{ */
 
         if(cb->abort_on_slow)
         {
-               cb->interval = CDTIME_T_TO_TIME_T(cf_get_default_interval ());
+               cb->interval = CDTIME_T_TO_TIME_T(plugin_get_interval());
+        }
+        if(cb->post_timeout == 0)
+        {
+               //setting default timeout to plugin interval.
+               cb->post_timeout = CDTIME_T_TO_TIME_T(plugin_get_interval());
         }
 
         /* Determine send_buffer_size. */