Skip to content

Commit

Permalink
fix: always provide addr
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdan-shulha committed Sep 8, 2024
1 parent eace539 commit db08b7b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/app/ptah-agent/ptah_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ func (a *Agent) sendStartedEvent(ctx context.Context) (*ptahClient.StartedRes, e
nodeData.Role = "worker"
}

nodeData.Addr = info.Swarm.NodeAddr
if info.Swarm.NodeAddr != "" {
nodeData.Addr = info.Swarm.NodeAddr
} else {
nodeData.Addr = nets[0].IPs[0].IP
}

startedReq := ptahClient.StartedReq{
NodeData: nodeData,
Expand Down

0 comments on commit db08b7b

Please sign in to comment.