Eliminate MacCache Start method
This commit is contained in:
1 parent
4d0ca39f97
commit
0627ade9de
2 files changed
+2
-5
No files matched your search
+2
-4
@@ -22,14 +22,12 @@ type MacCache struct {
|
||||
}
|
||||
|
||||
func NewMacCache(maxAge time.Duration, onExpiry func(net.HardwareAddr, *Peer)) *MacCache {
|
||||
return &MacCache{
|
||||
cache := &MacCache{
|
||||
table: make(map[uint64]*MacCacheEntry),
|
||||
maxAge: maxAge,
|
||||
onExpiry: onExpiry}
|
||||
}
|
||||
|
||||
func (cache *MacCache) Start() {
|
||||
cache.setExpiryTimer()
|
||||
return cache
|
||||
}
|
||||
|
||||
func (cache *MacCache) Enter(mac net.HardwareAddr, peer *Peer) bool {
|
||||
|
||||
Reference in new issue
Block a user