This is an automated email from the ASF dual-hosted git repository.

wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new cea8f10dc perf(ssl): break out right after sni matched. (#9906)
cea8f10dc is described below

commit cea8f10dce6336e1e09566e23f3e9ff24a5a1924
Author: ZongRun <[email protected]>
AuthorDate: Thu Jul 27 14:12:43 2023 +0800

    perf(ssl): break out right after sni matched. (#9906)
    
    Co-authored-by: timzrhuang <[email protected]>
---
 apisix/ssl/router/radixtree_sni.lua | 1 +
 1 file changed, 1 insertion(+)

diff --git a/apisix/ssl/router/radixtree_sni.lua 
b/apisix/ssl/router/radixtree_sni.lua
index b0e78a25f..f3e249167 100644
--- a/apisix/ssl/router/radixtree_sni.lua
+++ b/apisix/ssl/router/radixtree_sni.lua
@@ -185,6 +185,7 @@ function _M.match_and_set(api_ctx, match_only, alt_sni)
         for _, msni in ipairs(api_ctx.matched_sni) do
             if sni_rev == msni or not str_find(sni_rev, ".", #msni) then
                 matched = true
+                break
             end
         end
         if not matched then

Reply via email to