Skip to content

Commit

Permalink
nil ref fix in container inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
kcq committed Apr 13, 2022
1 parent d3b7a36 commit a970bf5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/app/master/inspectors/container/container_inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,11 @@ func (i *Inspector) setAvailablePorts(hostProbePorts map[dockerapi.Port][]docker
continue
}

if len(pbinding) == 0 {
i.logger.Debugf("setAvailablePorts: skipping empty port bindings => pk=%v", pk)
continue
}

i.AvailablePorts[pk] = pbinding[0]

portKeys, portList = addPorts(portKeys, portList, pk, pbinding)
Expand Down

0 comments on commit a970bf5

Please sign in to comment.