File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ void pullNotifications() {
1717 Serial.println (channelIterator.filename (" " ));
1818
1919 String host = channelIterator.host ();
20+ int port = 443 ;
21+ int portidx = host.indexOf (" :" );
22+ if (portidx != -1 ) {
23+ port = host.substring (portidx+1 ).toInt ();
24+ host=host.substring (0 ,portidx);
25+ }
2026 String url = channelIterator.url ();
2127 String fingerprint = channelIterator.fingerprint ();
2228
@@ -25,8 +31,10 @@ void pullNotifications() {
2531
2632 WiFiClientSecure client;
2733 Serial.print (" connecting to " );
28- Serial.println (host);
29- if (!client.connect (host.c_str (), 443 )) {
34+ Serial.print (host);
35+ Serial.print (" port " );
36+ Serial.println (port);
37+ if (!client.connect (host.c_str (), port)) {
3038 Serial.println (" connection failed" );
3139 continue ;
3240 }
You can’t perform that action at this time.
0 commit comments