MCPcopy Create free account
hub / github.com/PuerNya/git-proxy / Leave

Method Leave

main.go:100–113  ·  view source on GitHub ↗
(address string)

Source from the content-addressed store, hash-verified

98}
99
100func (ir *IPLimiter) Leave(address string) {
101 ir.RLock()
102 record, exist := ir.records[address]
103 ir.RUnlock()
104 if exist {
105 if record.count == 1 {
106 ir.Lock()
107 delete(ir.records, address)
108 ir.Unlock()
109 } else {
110 record.count = record.count - 1
111 }
112 }
113}
114
115var RequestLimiter *IPLimiter
116

Callers 1

requestLimitHandleFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected