Skip to content

Commit

Permalink
Merge branch 'develop' into fix/support-inbound-tracker-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis authored Nov 19, 2024
2 parents 453cb41 + 9d299f0 commit c908bbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
echo "${{ github.ref }}"
check-goreleaser:
if: inputs.skip_checks != true
runs-on: ${{ vars.RELEASE_RUNNER }}
steps:
- uses: actions/checkout@v4
- name: Build release snapshot
if: inputs.skip_checks != true
run: |
make release-snapshot
Expand Down
3 changes: 3 additions & 0 deletions cmd/zetaclientd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func Start(_ *cobra.Command, _ []string) error {
go func() {
host := tssServer.GetP2PHost()
pingRTT := make(map[peer.ID]int64)
pingRTTLock := sync.Mutex{}
for {
var wg sync.WaitGroup
for _, p := range whitelistedPeers {
Expand All @@ -240,6 +241,8 @@ func Start(_ *cobra.Command, _ []string) error {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
result := <-ping.Ping(ctx, host, p)
pingRTTLock.Lock()
defer pingRTTLock.Unlock()
if result.Error != nil {
masterLogger.Error().Err(result.Error).Msg("ping error")
pingRTT[p] = -1 // RTT -1 indicate ping error
Expand Down

0 comments on commit c908bbf

Please sign in to comment.