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

use Websocket to publish Qos1 message cause function_clause for emqx_coap subscriber #113

Open
WengangChen opened this issue Jul 4, 2019 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@WengangChen
Copy link

emqx_coap_mqtt_adapter.erl:

proto_deliver_ack(#message{qos = ?QOS_0}, Proto) ->
    Proto;
proto_deliver_ack(#message{qos = ?QOS_1, headers = #{packet_id := PacketId}}, Proto) ->
    case emqx_protocol:received(?PUBACK_PACKET(PacketId), Proto) of
        {ok, NewProto} -> NewProto;
        Other          -> error(Other)
    end;
proto_deliver_ack(#message{qos = ?QOS_2, headers = #{packet_id := PacketId}}, Proto) ->
    case emqx_protocol:received(?PUBREC_PACKET(PacketId), Proto) of
        {ok, NewProto} ->
            case emqx_protocol:received(?PUBCOMP_PACKET(PacketId), NewProto) of
                {ok, CurrentProto} -> CurrentProto;
                Another            -> error(Another)
            end;
        Other -> error(Other)
    end.

but Websocket send message without packet_id in headers.

@WengangChen WengangChen changed the title use Websocket to publish Qos1 message cause function_clause for emqx_coap subcriber use Websocket to publish Qos1 message cause function_clause for emqx_coap subscriber Jul 4, 2019
@ysfscream ysfscream added the help wanted Extra attention is needed label Sep 17, 2019
@ysfscream ysfscream assigned HJianBo and unassigned wivwiv Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants