Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix followed packet parse failure #2333

Merged
merged 2 commits into from Mar 20, 2019

Conversation

@HJianBo
Copy link
Member

HJianBo commented Mar 19, 2019

To fix #2303
It will report the following error, when a connection sends a TCP frame contained many of MQTT packet and followed a split MQTT packet.

(emqx@127.0.0.1)1> 2019-03-19 15:04:07.929 [error] someclientid@127.0.0.1:54311 Parse failed for function_clause
Stacktrace:[{emqx_frame,parse_utf8_string,
                        [<<48,48,48,48,95,49,52,48,111,0,9,107,97,108,97,47,
                           107,97,108,97,48,48,48,48,48,48,48,48,48,48,48,48,
                           48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48>>],
                        [{file,"src/emqx_frame.erl"},{line,354}]},
            {emqx_frame,parse_packet,3,
                        [{file,"src/emqx_frame.erl"},{line,163}]},
            {emqx_frame,parse_frame,4,
                        [{file,"src/emqx_frame.erl"},{line,104}]},
            {emqx_connection,process_incoming,3,
                             [{file,"src/emqx_connection.erl"},{line,371}]},
            {gen_statem,call_state_function,5,
                        [{file,"gen_statem.erl"},{line,1660}]},
            {gen_statem,loop_event_state_function,6,
                        [{file,"gen_statem.erl"},{line,1023}]},
            {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]
@coveralls

This comment has been minimized.

Copy link

coveralls commented Mar 19, 2019

Pull Request Test Coverage Report for Build 5095

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 68.628%

Totals Coverage Status
Change from base Build 5077: 0.03%
Covered Lines: 3382
Relevant Lines: 4928

💛 - Coveralls
Copy link
Contributor

gilbertwong96 left a comment

Add test case for reported bug

@HJianBo HJianBo force-pushed the fix_combined_parsing branch from e0cddc2 to b2bc46c Mar 19, 2019
@HJianBo HJianBo requested a review from gilbertwong96 Mar 19, 2019
@gilbertwong96 gilbertwong96 merged commit 8a73c62 into develop Mar 20, 2019
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.03%) to 68.628%
Details
@gilbertwong96 gilbertwong96 deleted the fix_combined_parsing branch Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.