Host.close() left timers running, and a live timer keeps the Dart
process alive: the README Quick Start connected two hosts, closed them,
and never exited. Now cancelled on close:
- the resource manager's GC timer, for the host and for the AutoNAT
dial-back host: the swarm that Libp2p.new_ builds closes the resource
manager created for it (Swarm.closeResourceManager);
- the swarm's 30 s relayed-connection probe;
- the hole punch service's address monitor;
- the next AutoNAT v2 probe, now a Timer instead of an uncancellable
Future.delayed, so close() no longer waits up to 5 s for it;
- the connection manager's 1 s status check per connection.
test/host/host_close_timers_test.dart records every timer created while
hosts start, connect through a relay and close, and requires none to be
active afterwards.
Also correct the README: drop the dart_udx import from the Quick Start,
stop claiming cross-subnet mDNS and routing-based discovery, note the
macOS port 5353 limit for the mDNS example, say which tests need Docker
or Go, and point Contributing at GitHub.
Release 4.1.2.