Parcourir la source

Call Collect on a separate goroutine.

Dmitry Chestnykh il y a 15 ans
Parent
commit
f9f7db1f43
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      captcha.go

+ 1 - 1
captcha.go

@@ -73,7 +73,7 @@ func New() string {
 	store.exp.PushBack(expValue{time.Seconds(), id})
 	store.exp.PushBack(expValue{time.Seconds(), id})
 	store.colNum++
 	store.colNum++
 	if store.colNum > CollectNum {
 	if store.colNum > CollectNum {
-		Collect()
+		go Collect()
 		store.colNum = 0
 		store.colNum = 0
 	}
 	}
 	return id
 	return id