Fix panic during network error in vsphere input (#4765)

This commit is contained in:
Pontus Rydin 2018-09-27 20:29:17 -04:00 committed by Daniel Nelson
parent 7d97ae6421
commit c369c1989f
1 changed files with 1 additions and 1 deletions

View File

@ -661,7 +661,7 @@ func (e *Endpoint) collectResource(ctx context.Context, resourceType string, acc
err := make(multiError, 0) err := make(multiError, 0)
wp.Drain(ctx, func(ctx context.Context, in interface{}) bool { wp.Drain(ctx, func(ctx context.Context, in interface{}) bool {
if in != nil { if in != nil {
mux.Unlock() mux.Lock()
defer mux.Unlock() defer mux.Unlock()
err = append(err, in.(error)) err = append(err, in.(error))
return false return false