move logging out of peer_cache

This commit is contained in:
Matthias Radestock committed 2014-09-04 00:02:08 +01:00
1 parent 9706934d89
commit b19abe4eab
2 files changed
+8 -5

No files matched your search

+4 -1
View File
@@ -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}