Merge pull request #1734 from gotthardp/send_client_pid

Send client_pid to distinguish multiple clients
This commit is contained in:
Gilbert 2018-08-20 20:48:01 +08:00 committed by GitHub
commit 94d326f398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -989,7 +989,8 @@ deliver(#mqtt_msg{qos = QoS, dup = Dup, retain = Retain, packet_id = PacketId,
topic = Topic, props = Props, payload = Payload}, topic = Topic, props = Props, payload = Payload},
State = #state{owner = Owner}) -> State = #state{owner = Owner}) ->
Owner ! {publish, #{qos => QoS, dup => Dup, retain => Retain, packet_id => PacketId, Owner ! {publish, #{qos => QoS, dup => Dup, retain => Retain, packet_id => PacketId,
topic => Topic, properties => Props, payload => Payload}}, topic => Topic, properties => Props, payload => Payload,
client_pid => self()}},
State. State.
packet_to_msg(#mqtt_packet{header = #mqtt_packet_header{type = ?PUBLISH, packet_to_msg(#mqtt_packet{header = #mqtt_packet_header{type = ?PUBLISH,