Skip to content

Commit 2ac1fe7

Browse files
committed
separate _get_pub init from _get_sub init
1 parent fdf9d66 commit 2ac1fe7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/AdafruitIO_Feed.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ bool AdafruitIO_Feed::get()
118118
strcat(_get_topic, "/f/");
119119
strcat(_get_topic, name);
120120
strcat(_get_topic, "/csv/get");
121+
}
121122

123+
if (!_get_pub)
124+
{
122125
_get_pub = new Adafruit_MQTT_Publish(_io->_mqtt, _get_topic);
123126
}
124127

0 commit comments

Comments
 (0)