From: Leon de Rooij Date: Tue, 28 Apr 2009 09:20:15 +0000 (+0200) Subject: freeswitch plugin: Only disconnect when connected X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=b263e8d9cbdc03b39333073a240d601015d70e83 freeswitch plugin: Only disconnect when connected --- diff --git a/src/freeswitch.c b/src/freeswitch.c index b59f7aa1..dbf9d215 100644 --- a/src/freeswitch.c +++ b/src/freeswitch.c @@ -524,7 +524,7 @@ static int fs_init (void) static int fs_shutdown (void) { DEBUG ("freeswitch plugin: disconnecting"); - esl_disconnect(&esl_handle); + if (esl_handle.connected) esl_disconnect(&esl_handle); fs_command_free (fs_commands_g); fs_commands_g = NULL; return (0);