Skip to content

Commit

Permalink
small nits
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed Jan 16, 2025
1 parent beca1fb commit 68c682e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions p2p/discovery/mdns/mdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package mdns
import (
"context"
"errors"
"github.com/libp2p/go-libp2p/core/event"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"
"io"
"math/rand"
"strings"
"sync"

"github.com/libp2p/go-libp2p/core/event"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"

"github.com/libp2p/zeroconf/v2"

logging "github.com/ipfs/go-log/v2"
Expand Down
8 changes: 4 additions & 4 deletions p2p/discovery/mdns/mdns_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package mdns

import (
"github.com/libp2p/go-libp2p/core/event"
"github.com/libp2p/go-libp2p/core/host"
"sync"
"testing"
"time"

"github.com/libp2p/go-libp2p/core/event"
"github.com/libp2p/go-libp2p/core/host"

"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p/core/peer"

Expand Down Expand Up @@ -114,7 +115,6 @@ func setupHost(t *testing.T) (host.Host, *notif) {
}

func TestMdnsServiceIpChange(t *testing.T) {

host1, notif1 := setupHost(t)
defer host1.Close()

Expand All @@ -131,5 +131,5 @@ func TestMdnsServiceIpChange(t *testing.T) {

assert.Eventually(t, func() bool {
return len(notif1.GetPeers()) == 1 && len(notif2.GetPeers()) == 1
}, 5*time.Second, 5*time.Millisecond)
}, 5*time.Second, 100*time.Millisecond)
}

0 comments on commit 68c682e

Please sign in to comment.