Skip to content

Commit

Permalink
fix panic for nil node
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Oct 23, 2024
1 parent 81bbf3a commit b6d42fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func (ln *localNetwork) loadConfig(ctx context.Context, networkConfig network.Co

for i := range nodeConfigs {
if node, nodeErr := ln.addNode(nodeConfigs[i]); nodeErr != nil {
if ln.reassignPortsIfUsed {
if ln.reassignPortsIfUsed && node != nil {
if mainLog, err := os.ReadFile(filepath.Join(node.GetLogsDir(), "main.log")); err == nil {
if strings.Contains(string(mainLog), "bind: address already in use") {
ln.log.Info(fmt.Sprintf(
Expand Down

0 comments on commit b6d42fc

Please sign in to comment.