From ee09f5a4afb4442c6cb6297ac133e52d7201cc72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Mat=C4=9Bja?= Date: Wed, 26 Jun 2019 11:30:29 +0200 Subject: [PATCH] Don't try to load plugin without name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This can happen when you have --config-only network Such attempt will fail anyway and it will create 15s delay in container startup Signed-off-by: Pavel Matěja --- pkg/plugins/plugins.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/plugins/plugins.go b/pkg/plugins/plugins.go index 28c06ff693..2371e92101 100644 --- a/pkg/plugins/plugins.go +++ b/pkg/plugins/plugins.go @@ -254,6 +254,9 @@ func get(name string) (*Plugin, error) { // Get returns the plugin given the specified name and requested implementation. func Get(name, imp string) (*Plugin, error) { + if name == "" { + return nil, errors.New("Unable to find plugin without name") + } pl, err := get(name) if err != nil { return nil, err