Skip to content

Commit

Permalink
Fix relay lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
boreq committed Oct 30, 2023
1 parent f7f2b40 commit 33d7811
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion service/adapters/purple_pages.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ func (p *PurplePages) GetRelays(ctx context.Context, publicKey domain.PublicKey)
var compoundError error
errorsCounter := 0

for result := range ch {
for i := 0; i < 2; i++ {
result := <-ch

if result.Err != nil {
if errors.Is(err, ErrPurplePagesTimeout) {
return nil, errors.Wrap(err, "one of the lookups timed out")
Expand Down
1 change: 0 additions & 1 deletion service/adapters/relay_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package adapters

import (
"context"

"github.com/boreq/errors"
"github.com/planetary-social/nos-crossposting-service/internal"
"github.com/planetary-social/nos-crossposting-service/internal/logging"
Expand Down

0 comments on commit 33d7811

Please sign in to comment.