diff options
| author | liuchang <[email protected]> | 2023-05-18 09:24:17 +0000 |
|---|---|---|
| committer | liuchang <[email protected]> | 2023-05-18 09:24:17 +0000 |
| commit | 82db1f40787a618f30a57c3ad936316ff403828a (patch) | |
| tree | 4ec94e67bbd8c487b9a1c005e5d21d538ff9783d /shaping/test/stub.cpp | |
| parent | 78836a03a4891cafeab4852b2a90af9a86fc5be2 (diff) | |
1.use the highest priority when a session hit multi rules
2.update metric to fieldstat every 0.2s
Diffstat (limited to 'shaping/test/stub.cpp')
| -rw-r--r-- | shaping/test/stub.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shaping/test/stub.cpp b/shaping/test/stub.cpp index bd3c796..07f0935 100644 --- a/shaping/test/stub.cpp +++ b/shaping/test/stub.cpp @@ -105,6 +105,13 @@ void stub_refresh_token_bucket(int profile_id) void stub_set_async_token_get_times(int profile_id, int times) { pf_async_times[profile_id] = times; + + if (pf_async_times[profile_id] == 0) { + for (unsigned int i = 0; i < pf_async_thread[profile_id].size(); i++) { + stub_get_token_thread_func(&pf_async_thread[profile_id][i]); + } + pf_async_thread[profile_id].clear(); + } return; } |
