status/plugin: do not test connection if disabled

so that if one disables the plugin (e.g. because it is offline),
it will work even when the server is not reachable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-12-07 15:37:07 +01:00 committed by Thomas Lamprecht
parent ed73ad441f
commit 236a992623

View File

@ -129,6 +129,9 @@ sub send {
sub test_connection {
my ($class, $cfg) = @_;
# do not check connection for disabled plugins
return if $cfg->{disable};
my $conn = $class->_connect($cfg);
$class->_disconnect($conn);
}