Fix panic during network error in vsphere input (#4765)
This commit is contained in:
parent
7d97ae6421
commit
c369c1989f
|
@ -661,7 +661,7 @@ func (e *Endpoint) collectResource(ctx context.Context, resourceType string, acc
|
|||
err := make(multiError, 0)
|
||||
wp.Drain(ctx, func(ctx context.Context, in interface{}) bool {
|
||||
if in != nil {
|
||||
mux.Unlock()
|
||||
mux.Lock()
|
||||
defer mux.Unlock()
|
||||
err = append(err, in.(error))
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue