Skip to content

Commit 87e2220

Browse files
committed
switch back to blocking client in neb module (fixes #167)
seems like setting non-blocking client options leads to leaking memory in gearmand after a while (~2h) of runtime. So turn it off again. Signed-off-by: Sven Nierlein <sven@consol.de>
1 parent d93df24 commit 87e2220

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

neb_module_naemon/mod_gearman.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ int nebmodule_init( int flags, char *args, nebmodule *handle ) {
170170
}
171171

172172
/* create client */
173-
client = create_client(mod_gm_opt->server_list);
173+
client = create_client_blocking(mod_gm_opt->server_list);
174174
if(client == NULL) {
175175
gm_log( GM_LOG_ERROR, "cannot start client\n" );
176176
return NEB_ERROR;
@@ -506,7 +506,7 @@ static int handle_eventhandler( int event_type, void *data ) {
506506
GM_DEFAULT_JOB_RETRIES,
507507
mod_gm_opt->transportmode,
508508
mod_ctx,
509-
1,
509+
0,
510510
mod_gm_opt->log_stats_interval
511511
) == GM_OK) {
512512
gm_log( GM_LOG_TRACE, "handle_eventhandler() finished successfully\n" );
@@ -710,7 +710,7 @@ static int handle_notifications( int event_type, void *data ) {
710710
GM_DEFAULT_JOB_RETRIES,
711711
mod_gm_opt->transportmode,
712712
mod_ctx,
713-
1,
713+
0,
714714
mod_gm_opt->log_stats_interval
715715
) == GM_OK) {
716716
gm_log( GM_LOG_TRACE, "handle_notifications() finished successfully\n" );
@@ -918,7 +918,7 @@ static int handle_host_check( int event_type, void *data ) {
918918
GM_DEFAULT_JOB_RETRIES,
919919
mod_gm_opt->transportmode,
920920
mod_ctx,
921-
1,
921+
0,
922922
mod_gm_opt->log_stats_interval
923923
) == GM_OK) {
924924
}
@@ -1074,7 +1074,7 @@ static int handle_svc_check( int event_type, void *data ) {
10741074
GM_DEFAULT_JOB_RETRIES,
10751075
mod_gm_opt->transportmode,
10761076
mod_ctx,
1077-
1,
1077+
0,
10781078
mod_gm_opt->log_stats_interval
10791079
) == GM_OK) {
10801080
gm_log( GM_LOG_TRACE, "handle_svc_check() finished successfully\n" );
@@ -1538,7 +1538,7 @@ int handle_perfdata(int event_type, void *data) {
15381538
GM_DEFAULT_JOB_RETRIES,
15391539
mod_gm_opt->transportmode,
15401540
mod_ctx,
1541-
1,
1541+
0,
15421542
mod_gm_opt->log_stats_interval
15431543
) == GM_OK) {
15441544
gm_log( GM_LOG_TRACE, "handle_perfdata() successfully added data to %s\n", perfdata_queue );
@@ -1680,7 +1680,7 @@ int handle_export(int callback_type, void *data) {
16801680
GM_DEFAULT_JOB_RETRIES,
16811681
mod_gm_opt->transportmode,
16821682
mod_ctx,
1683-
1,
1683+
0,
16841684
mod_gm_opt->log_stats_interval
16851685
);
16861686
}

0 commit comments

Comments
 (0)