test(exproto): fix timeout cases

This commit is contained in:
JianBo He 2022-08-19 18:13:59 +08:00
parent f4ad7acd06
commit efdde6e107
1 changed files with 5 additions and 3 deletions

View File

@ -213,11 +213,13 @@ t_keepalive_timeout(Cfg) ->
send(Sock, ConnBin), send(Sock, ConnBin),
{ok, ConnAckBin} = recv(Sock, 5000), {ok, ConnAckBin} = recv(Sock, 5000),
DisconnectBin = frame_disconnect(), %% Timed out connections are closed immediately,
{ok, DisconnectBin} = recv(Sock, 10000), %% so there may not be a disconnect message here
%%DisconnectBin = frame_disconnect(),
%%{ok, DisconnectBin} = recv(Sock, 10000),
SockType =/= udp andalso begin SockType =/= udp andalso begin
{error, closed} = recv(Sock, 5000) {error, closed} = recv(Sock, 10000)
end, ok. end, ok.
t_hook_connected_disconnected(Cfg) -> t_hook_connected_disconnected(Cfg) ->