mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-25 10:13:44 +00:00
Merge pull request #2610 from babarosaM33/bloom_reset
ppbloom: save free() and subsequent init() overhead
This commit is contained in:
+1
-1
Submodule libbloom updated: 7a9deb893f...437e1add5a
+1
-2
@@ -88,8 +88,7 @@ ppbloom_add(const void *buffer, int len)
|
||||
if (bloom_count[current] >= entries) {
|
||||
bloom_count[current] = 0;
|
||||
current = current == PING ? PONG : PING;
|
||||
bloom_free(ppbloom + current);
|
||||
bloom_init(ppbloom + current, entries, error);
|
||||
bloom_reset(ppbloom + current);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user