diff --git a/p2p/host/basic/basic_host_test.go b/p2p/host/basic/basic_host_test.go index b80c702c9..5d582d5e1 100644 --- a/p2p/host/basic/basic_host_test.go +++ b/p2p/host/basic/basic_host_test.go @@ -23,6 +23,13 @@ import ( madns "github.com/multiformats/go-multiaddr-dns" ) +func TestHostDoubleClose(t *testing.T) { + ctx := context.Background() + h1 := New(swarmt.GenSwarm(t, ctx)) + h1.Close() + h1.Close() +} + func TestHostSimple(t *testing.T) { ctx := context.Background() h1 := New(swarmt.GenSwarm(t, ctx))