mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Don't fail if there are no existing nat mappings.
This commit is contained in:
@@ -194,10 +194,9 @@ func (c *Conntracker) existingConnections(args ...string) ([]Flow, error) {
|
||||
}
|
||||
}()
|
||||
var result conntrack
|
||||
if err := xml.NewDecoder(stdout).Decode(&result); err != nil {
|
||||
if err == io.EOF {
|
||||
return []Flow{}, err
|
||||
}
|
||||
if err := xml.NewDecoder(stdout).Decode(&result); err == io.EOF {
|
||||
return []Flow{}, nil
|
||||
} else if err != nil {
|
||||
return []Flow{}, err
|
||||
}
|
||||
return result.Flows, nil
|
||||
|
||||
Reference in New Issue
Block a user