Skip to content

Commit

Permalink
add more condition for check tpM is available or not
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpalide committed Nov 2, 2023
1 parent 3d020bc commit a1b6446
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/visor/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,9 @@ func (v *Visor) Ports() (map[string]PortDetail, error) {
// TransportTypes implements API.
func (v *Visor) TransportTypes() ([]string, error) {
var types []string
if v.tpM == nil {
return types, ErrTrpMangerNotAvailable
}
for _, netType := range v.tpM.Networks() {
types = append(types, string(netType))
}
Expand Down

0 comments on commit a1b6446

Please sign in to comment.