From 0db1cd6c5597cb5045684d517fa849a15c2d9e4d Mon Sep 17 00:00:00 2001 From: luwenpeng Date: Wed, 31 Jul 2019 14:31:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20fail=5Ftime=5Fwindow=20?= =?UTF-8?q?=E7=A7=92=E5=86=85=20suspect=5Fpinning=5Fcount=20=E5=92=8C=20pr?= =?UTF-8?q?otocol=5Ferror=5Fcount=20=E6=8C=81=E7=BB=AD=E7=B4=AF=E8=AE=A1?= =?UTF-8?q?=E4=B8=8D=E5=BD=92=E9=9B=B6=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/ssl_service_cache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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_countfail_as_pinning_count) cli_st->suspect_pinning_count=0; if(cli_st->protocol_error_countfail_as_proto_err_count) cli_st->protocol_error_count=0;