File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 6161 MQTT_CLIENT_RX_STATE_DISCARD_PUBLISH_PAYLOAD
6262};
6363
64- MqttClient::MqttClient (Client& client) :
65- _client(& client),
64+ MqttClient::MqttClient (Client* client) :
65+ _client(client),
6666 _onMessage(NULL ),
6767 _cleanSession(true ),
6868 _keepAliveInterval(60 * 1000L ),
@@ -82,6 +82,11 @@ MqttClient::MqttClient(Client& client) :
8282 setTimeout (0 );
8383}
8484
85+ MqttClient::MqttClient (Client& client) : MqttClient(&client)
86+ {
87+
88+ }
89+
8590MqttClient::~MqttClient ()
8691{
8792 if (_willBuffer) {
Original file line number Diff line number Diff line change 3434
3535class MqttClient : public Client {
3636public:
37+ MqttClient (Client* client);
3738 MqttClient (Client& client);
3839 virtual ~MqttClient ();
3940
41+
42+ inline void setClient (Client& client) { _client = &client; }
43+
44+
4045 void onMessage (void (*)(int ));
4146
4247 int parseMessage ();
You can’t perform that action at this time.
0 commit comments