mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
fix bug
This commit is contained in:
parent
01aa411498
commit
79bf6fca69
@ -361,7 +361,7 @@ impl AddressFilter {
|
|||||||
Entry::Occupied(mut o) => {
|
Entry::Occupied(mut o) => {
|
||||||
let cnt = o.get_mut();
|
let cnt = o.get_mut();
|
||||||
assert!(*cnt > 0);
|
assert!(*cnt > 0);
|
||||||
if *cnt == 0 {
|
if *cnt == 1 {
|
||||||
inner.conn_count_by_ip4.remove(&v4);
|
inner.conn_count_by_ip4.remove(&v4);
|
||||||
} else {
|
} else {
|
||||||
*cnt -= 1;
|
*cnt -= 1;
|
||||||
@ -377,7 +377,7 @@ impl AddressFilter {
|
|||||||
Entry::Occupied(mut o) => {
|
Entry::Occupied(mut o) => {
|
||||||
let cnt = o.get_mut();
|
let cnt = o.get_mut();
|
||||||
assert!(*cnt > 0);
|
assert!(*cnt > 0);
|
||||||
if *cnt == 0 {
|
if *cnt == 1 {
|
||||||
inner.conn_count_by_ip6_prefix.remove(&v6);
|
inner.conn_count_by_ip6_prefix.remove(&v6);
|
||||||
} else {
|
} else {
|
||||||
*cnt -= 1;
|
*cnt -= 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user