forked from knolleary/pubsubclient
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
As @TD-er mentioned in #32 change socketTimeout internal from seconds to milliseconds to avoid the multiplication every time.
However there is still something odd:
if (currentMillis - previousMillis >= this->socketTimeout * 1000UL) {
return false;
}
Why consider the socketTimeout as seconds here?
It isn't a bug, just odd as you now need to multiply it with 1000 every time you want to check it.
API would not change by this way:
PubSubClient& PubSubClient::setSocketTimeout(uint16_t timeout) {
this->socketTimeout = timeout * 1000UL;
return *this;
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request