We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9994ce1 commit bc0f59eCopy full SHA for bc0f59e
1 file changed
sandbox.go
@@ -142,12 +142,15 @@ func (sb *sandbox) Labels() map[string]interface{} {
142
func (sb *sandbox) Statistics() (map[string]*types.InterfaceStatistics, error) {
143
m := make(map[string]*types.InterfaceStatistics)
144
145
- if sb.osSbox == nil {
+ sb.Lock()
146
+ osb := sb.osSbox
147
+ sb.Unlock()
148
+ if osb == nil {
149
return m, nil
150
}
151
152
var err error
- for _, i := range sb.osSbox.Info().Interfaces() {
153
+ for _, i := range osb.Info().Interfaces() {
154
if m[i.DstName()], err = i.Statistics(); err != nil {
155
return m, err
156
0 commit comments