diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 924706af29..02977127ff 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -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 diff --git a/cmd/zetaclientd/start.go b/cmd/zetaclientd/start.go index 46d204fa34..b9722c9213 100644 --- a/cmd/zetaclientd/start.go +++ b/cmd/zetaclientd/start.go @@ -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 { @@ -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