Skip to content

Commit 00352f8

Browse files
committed
esp8266: add http init to constructors
1 parent 8d6fde8 commit 00352f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

AdafruitIO_ESP8266.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ AdafruitIO_ESP8266::AdafruitIO_ESP8266(const char *user, const char *key, const
1818
_ssid = ssid;
1919
_pass = pass;
2020
_client = new WiFiClientSecure;
21-
_mqtt = new Adafruit_MQTT_Client(_client, _host, _port);
21+
_mqtt = new Adafruit_MQTT_Client(_client, _host, _mqtt_port);
22+
_http = new HttpClient(*_client, _host, _http_port);
2223
}
2324

2425
AdafruitIO_ESP8266::AdafruitIO_ESP8266(const __FlashStringHelper *user, const __FlashStringHelper *key, const __FlashStringHelper *ssid, const __FlashStringHelper *pass):AdafruitIO(user, key)
2526
{
2627
_ssid = (const char*)ssid;
2728
_pass = (const char*)pass;
2829
_client = new WiFiClientSecure;
29-
_mqtt = new Adafruit_MQTT_Client(_client, _host, _port);
30+
_mqtt = new Adafruit_MQTT_Client(_client, _host, _mqtt_port);
31+
_http = new HttpClient(*_client, _host, _http_port);
3032
}
3133

3234
AdafruitIO_ESP8266::~AdafruitIO_ESP8266()

0 commit comments

Comments
 (0)