Change the default QoS of will message to QOS_1
This commit is contained in:
parent
c3919a64e6
commit
35e08df735
|
@ -80,6 +80,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% MQTT Control Packet Types
|
%% MQTT Control Packet Types
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-define(RESERVED, 0). %% Reserved
|
-define(RESERVED, 0). %% Reserved
|
||||||
-define(CONNECT, 1). %% Client request to connect to Server
|
-define(CONNECT, 1). %% Client request to connect to Server
|
||||||
-define(CONNACK, 2). %% Server to Client: Connect acknowledgment
|
-define(CONNACK, 2). %% Server to Client: Connect acknowledgment
|
||||||
|
@ -94,7 +95,7 @@
|
||||||
-define(UNSUBACK, 11). %% Unsubscribe acknowledgment
|
-define(UNSUBACK, 11). %% Unsubscribe acknowledgment
|
||||||
-define(PINGREQ, 12). %% PING request
|
-define(PINGREQ, 12). %% PING request
|
||||||
-define(PINGRESP, 13). %% PING response
|
-define(PINGRESP, 13). %% PING response
|
||||||
-define(DISCONNECT, 14). %% Client is disconnecting
|
-define(DISCONNECT, 14). %% Client or Server is disconnecting
|
||||||
-define(AUTH, 15). %% Authentication exchange
|
-define(AUTH, 15). %% Authentication exchange
|
||||||
|
|
||||||
-define(TYPE_NAMES, [
|
-define(TYPE_NAMES, [
|
||||||
|
@ -146,11 +147,12 @@
|
||||||
%% MQTT Packet Fixed Header
|
%% MQTT Packet Fixed Header
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-record(mqtt_packet_header, {
|
-record(mqtt_packet_header,
|
||||||
type = ?RESERVED :: mqtt_packet_type(),
|
{ type = ?RESERVED :: mqtt_packet_type(),
|
||||||
dup = false :: boolean(),
|
dup = false :: boolean(),
|
||||||
qos = ?QOS_0 :: mqtt_qos(),
|
qos = ?QOS_0 :: mqtt_qos(),
|
||||||
retain = false :: boolean()}).
|
retain = false :: boolean()
|
||||||
|
}).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% MQTT Packets
|
%% MQTT Packets
|
||||||
|
@ -165,7 +167,7 @@
|
||||||
proto_ver = ?MQTT_PROTO_V4 :: mqtt_vsn(),
|
proto_ver = ?MQTT_PROTO_V4 :: mqtt_vsn(),
|
||||||
proto_name = <<"MQTT">> :: binary(),
|
proto_name = <<"MQTT">> :: binary(),
|
||||||
will_retain = false :: boolean(),
|
will_retain = false :: boolean(),
|
||||||
will_qos = ?QOS_0 :: mqtt_qos(),
|
will_qos = ?QOS_1 :: mqtt_qos(),
|
||||||
will_flag = false :: boolean(),
|
will_flag = false :: boolean(),
|
||||||
clean_sess = false :: boolean(),
|
clean_sess = false :: boolean(),
|
||||||
keep_alive = 60 :: non_neg_integer(),
|
keep_alive = 60 :: non_neg_integer(),
|
||||||
|
|
Loading…
Reference in New Issue