diff --git a/test/emqx_channel_SUITE.erl b/test/emqx_channel_SUITE.erl index 412bafe80..be9e008d2 100644 --- a/test/emqx_channel_SUITE.erl +++ b/test/emqx_channel_SUITE.erl @@ -113,7 +113,7 @@ t_handle_in_unexpected_connect_packet(_) -> emqx_channel:handle_in(?CONNECT_PACKET(connpkt()), Channel). t_handle_in_unexpected_packet(_) -> - Channel = channel(), + Channel = emqx_channel:set_field(conn_state, idle, channel()), Packet = ?DISCONNECT_PACKET(?RC_PROTOCOL_ERROR), {ok, [{outgoing, Packet}, {close, protocol_error}], Channel} = emqx_channel:handle_in(?PUBLISH_PACKET(?QOS_0), Channel).