mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-26 16:52:25 +00:00
Merge pull request #2639 from weaveworks/2638-connection-pid-pollution
ensure connections from /proc/net/tcp{,6} get the right pid
Fixes #2638.
This commit is contained in:
@@ -28,6 +28,11 @@ func (c *pnConnIter) Next() *Connection {
|
||||
}
|
||||
if proc, ok := c.procs[n.Inode]; ok {
|
||||
n.Proc = *proc
|
||||
} else {
|
||||
// ProcNet.Next() always returns a pointer to the same
|
||||
// struct. We therefore must clear any garbage left over from
|
||||
// the previous call.
|
||||
n.Proc = Proc{}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user