probe-lab / zikade

A Go implementation of the libp2p Kademlia DHT specification
Other
8 stars 3 forks source link

fix: quic go-routine leak in tests #56

Closed dennis-tra closed 9 months ago

dennis-tra commented 9 months ago

By only enabling the TCP transport we won't leak quic-reuse goroutines in our tests: https://github.com/libp2p/go-libp2p/issues/2514

Relates to: https://github.com/plprobelab/zikade/issues/34

We can't configure the leveldb timeout, so we're leaking one goroutine after each test for ~1s.

Then I found that there's another goroutine still dangling around after each test which could be closed with:

import (
    log "github.com/ipfs/go-log/writer"
)

func ... {
   log.WriterGroup.Close()
}