move logging out of peer_cache
This commit is contained in:
1 parent
9706934d89
commit
b19abe4eab
2 files changed
+8
-5
No files matched your search
@@ -18,10 +18,13 @@ func NewRouter(iface *net.Interface, name PeerName, password []byte, connLimit i
|
||||
onMacExpiry := func(mac net.HardwareAddr, peer *Peer) {
|
||||
log.Println("Expired MAC", mac, "at", peer.Name)
|
||||
}
|
||||
onPeerGC := func(peer *Peer) {
|
||||
log.Println("Removing unreachable", peer)
|
||||
}
|
||||
router := &Router{
|
||||
Iface: iface,
|
||||
Macs: NewMacCache(macMaxAge, onMacExpiry),
|
||||
Peers: NewPeerCache(),
|
||||
Peers: NewPeerCache(onPeerGC),
|
||||
ConnLimit: connLimit,
|
||||
BufSz: bufSz,
|
||||
LogFrame: logFrame}
|
||||
|
||||
Reference in new issue
Block a user