1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Don't try to load plugin without name

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 <pavel@verotel.cz>
This commit is contained in:
Pavel Matěja 2019-06-26 11:30:29 +02:00
parent 52c16677b2
commit ee09f5a4af

View file

@ -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