Skip to content

Commit

Permalink
added 1 second delay in thread for peer announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
Aven Dauz authored and Aven Dauz committed Aug 12, 2021
1 parent 787ec44 commit 438f31b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x/nft/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/bluzelle/curium/x/torrentClient"
"github.com/cosmos/cosmos-sdk/x/auth"
"sync"
"time"

"github.com/gorilla/mux"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -174,6 +175,7 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val

defer func() {
go func() {
time.Sleep(time.Second)
err := am.keeper.BroadcastRegisterBtPeer(ctx)
if err != nil {
am.keeper.Logger(ctx).Error("Broadcast Register Bt Peer failed", "error", err)
Expand Down

0 comments on commit 438f31b

Please sign in to comment.