Explorar o código

Merge pull request #8903 from lafirest/fix/tls_lib_error

fix(tls): fix ciphers cache return `ok` at the first time call
lafirest %!s(int64=3) %!d(string=hai) anos
pai
achega
fbea5dce58
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      apps/emqx/src/emqx_tls_lib.erl

+ 2 - 1
apps/emqx/src/emqx_tls_lib.erl

@@ -145,7 +145,8 @@ all_ciphers_set_cached() ->
     case persistent_term:get(?FUNCTION_NAME, false) of
     case persistent_term:get(?FUNCTION_NAME, false) of
         false ->
         false ->
             S = sets:from_list(all_ciphers()),
             S = sets:from_list(all_ciphers()),
-            persistent_term:put(?FUNCTION_NAME, S);
+            persistent_term:put(?FUNCTION_NAME, S),
+            S;
         Set ->
         Set ->
             Set
             Set
     end.
     end.