Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
tweak: Increase offline message scanning frequency + reduce timeout ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacia committed May 1, 2020
1 parent 25c5e70 commit 395af06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/retriever/retriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func NewMessageRetriever(cfg MRConfig) *MessageRetriever {

func (m *MessageRetriever) Run() {
dht := time.NewTicker(time.Hour)
peers := time.NewTicker(time.Minute * 10)
peers := time.NewTicker(time.Minute)
defer dht.Stop()
defer peers.Stop()
go m.fetchPointersFromDHT()
Expand Down Expand Up @@ -243,7 +243,7 @@ func (m *MessageRetriever) fetchIPFS(pid peer.ID, n *core.IpfsNode, addr ma.Mult
var err error

go func() {
ciphertext, err = ipfs.Cat(n, addr.String(), time.Minute*5)
ciphertext, err = ipfs.Cat(n, addr.String(), time.Second*10)
c <- struct{}{}
}()

Expand Down

0 comments on commit 395af06

Please sign in to comment.