Pārlūkot izejas kodu

fix(quic): error handling for getstats.

- return {error, closed} instead
- quicer demo/3 branch.
William Yang 4 gadi atpakaļ
vecāks
revīzija
9570d01792
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 1
      apps/emqx/src/emqx_quic_stream.erl
  2. 1 1
      rebar.config

+ 1 - 1
apps/emqx/src/emqx_quic_stream.erl

@@ -48,7 +48,7 @@ peercert(_S) ->
 
 
 getstat(Socket, Stats) ->
 getstat(Socket, Stats) ->
     case quicer:getstats(Socket, Stats) of
     case quicer:getstats(Socket, Stats) of
-        {error, _} -> [];
+        {error, _} -> {error, closed};
         Res -> {ok, Res}
         Res -> {ok, Res}
     end.
     end.
 
 

+ 1 - 1
rebar.config

@@ -54,7 +54,7 @@
     , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.13.0"}}}
     , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.13.0"}}}
     , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.5.1"}}}
     , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.5.1"}}}
     , {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.2.1"}}}
     , {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.2.1"}}}
-    , {quicer, {git, "https://github.com/qzhuyan/quic.git", {branch, "fix/getopt3-free-bin"}}}
+    , {quicer, {git, "https://github.com/qzhuyan/quic.git", {branch, "demo/3"}}}
     ]}.
     ]}.
 
 
 {xref_ignores,
 {xref_ignores,