Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Feb 24, 2023
1 parent bdcb6a1 commit 30ce399
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/client/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,18 +331,22 @@ func newUnit(
cfgIdx uint64,
client *clientV2) *Unit {

return &Unit{
unit := Unit{
id: id,
unitType: unitType,
config: cfg,
configIdx: cfgIdx,
expectedState: exp,
features: client.features,
logLevel: logLevel,
state: UnitStateStarting,
stateMsg: "Starting",
client: client,
actions: make(map[string]Action),
diagHooks: make(map[string]diagHook),
}

if client != nil {
unit.features = client.features
}
return &unit
}

0 comments on commit 30ce399

Please sign in to comment.