diff options
| author | luwenpeng <[email protected]> | 2019-07-31 14:31:32 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2019-07-31 14:31:32 +0800 |
| commit | 0db1cd6c5597cb5045684d517fa849a15c2d9e4d (patch) | |
| tree | 604745182afca3281c440ea7bb115349b82bbcb3 /platform/src/ssl_service_cache.cpp | |
| parent | aa88471f2564da19e2f6a1b8e01fc5393316be99 (diff) | |
修正 fail_time_window 秒内 suspect_pinning_count 和 protocol_error_count 持续累计不归零的 bug
Diffstat (limited to 'platform/src/ssl_service_cache.cpp')
| -rw-r--r-- | platform/src/ssl_service_cache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/src/ssl_service_cache.cpp b/platform/src/ssl_service_cache.cpp index 3bdb926..e005450 100644 --- a/platform/src/ssl_service_cache.cpp +++ b/platform/src/ssl_service_cache.cpp @@ -146,10 +146,11 @@ static long cli_st_write_cb(void * data, const uchar * key, uint size, void * us { cli_st=ALLOC(struct ssl_svc_client_st, 1); cli_st->ref_svc_cache=cache; + cli_st->last_update_time = now; ret = MESA_htable_add(cache->cli_st_hash, key, size, cli_st); assert(ret >= 0); } - if(cli_st->last_update_time-now>cache->fail_time_window) + if (now - cli_st->last_update_time > cache->fail_time_window) { if(cli_st->suspect_pinning_count<cache->fail_as_pinning_count) cli_st->suspect_pinning_count=0; if(cli_st->protocol_error_count<cache->fail_as_proto_err_count) cli_st->protocol_error_count=0; |
