treat error message as received msg

and also fix fix flag, using 'and' instead 'equal'

Signed-off-by: xiehuc <xiehuc@gmail.com>
Merge pull request #8 from xiehuc/master

treat error message as received msg