Explorar o código

Fix the message delivery to remote

terry-xiaoyu %!s(int64=7) %!d(string=hai) anos
pai
achega
389b3c80bc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/emqx_session.erl

+ 1 - 1
src/emqx_session.erl

@@ -775,7 +775,7 @@ redeliver({pubrel, PacketId}, #state{conn_pid = ConnPid}) ->
 deliver(PacketId, Msg, #state{conn_pid = ConnPid, binding = local}) ->
     ConnPid ! {deliver, {publish, PacketId, Msg}};
 deliver(PacketId, Msg, #state{conn_pid = ConnPid, binding = remote}) ->
-    emqx_rpc:cast(node(ConnPid), erlang, send, [ConnPid, {deliver, PacketId, Msg}]).
+    emqx_rpc:cast(node(ConnPid), erlang, send, [ConnPid, {deliver, {publish, PacketId, Msg}}]).
 
 %%------------------------------------------------------------------------------
 %% Awaiting ACK for QoS1/QoS2 Messages