Skip to content

Clean Session #6

Closed
Closed
@fabianbusch

Description

@fabianbusch

Hi, it would be nice to get a chance to set the flag for clean session to high or either low.

Best Regards

Fabian

Activity

sandeepmistry

sandeepmistry commented on Sep 9, 2019

@sandeepmistry
Contributor

Hi @fabianbusch,

Thanks for the feedback!

I can see two ways of doing this:

  1. add an optional cleanSession parameter to connect(...):
virtual int connect(IPAddress ip, uint16_t port = 1883, bool cleanSession = true);
virtual int connect(const char *host, uint16_t port = 1883, bool cleanSession = true);
  1. adding new API's
void cleanSession();
void noCleanSession();
// OR
void setCleanSession(bool cleanSession);

I have a slight preference towards 2) with setCleanSession(...). Do you have a preference?

@tigoe any thoughts on this?

tigoe

tigoe commented on Sep 9, 2019

@tigoe

I think either is fine, though I also like the explicit setCleanSession().

fabianbusch

fabianbusch commented on Sep 9, 2019

@fabianbusch
Author

I think, to keep it backward compatible - I would prefer a separate API Call, too.

By the way - after the change in espressive interfaces for wifi ... there was a missing implementation of a virtual method. Has that been fixed, already?

per1234

per1234 commented on Sep 10, 2019

@per1234
Contributor

By the way - after the change in espressive interfaces for wifi ... there was a missing implementation of a virtual method. Has that been fixed, already?

If we are thinking of the same thing, that was just fixed on the ESP32 developers' end of things (though not released yet):
espressif/arduino-esp32#3191

sandeepmistry

sandeepmistry commented on Sep 10, 2019

@sandeepmistry
Contributor

@tigoe @fabianbusch thanks for the feedback!

@fabianbusch Please try out the changes in pull request #12, and let use know how it goes.

manchoz

manchoz commented on Mar 11, 2020

@manchoz

@aentinger, @per1234 I think we could merge this, LGTM.

aentinger

aentinger commented on Mar 12, 2020

@aentinger
Contributor

Not sure if it doesn't affect ArduinoIoTCloud, I'd like to test it first.

self-assigned this
on Mar 12, 2020
aentinger

aentinger commented on Mar 18, 2020

@aentinger
Contributor

Fixed by #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Clean Session · Issue #6 · arduino-libraries/ArduinoMqttClient