fix url panic

This commit is contained in:
Asim Aslam
2021-06-03 17:01:55 +01:00
parent e2b4f95434
commit 12088fb1d4
2 changed files with 2 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
package main
//go:generate make proto

View File

@@ -121,7 +121,7 @@ func (e *Url) Proxy(ctx context.Context, req *url.ProxyRequest, rsp *url.ProxyRe
e.cache.Set(id, int64(1), cache.NoExpiration)
} else {
// we null out the counter
e.cache.Set(id, 0, cache.NoExpiration)
e.cache.Set(id, int64(0), cache.NoExpiration)
if v.(int64)%10 == 0 {
go func() {
// We add instead of set in case the service runs in multiple