Closed rjjrbatarao closed 2 years ago
Hi @rjjrbatarao
Thanks for your nice words and the enhancement request.
I already found out and fixed the issue, and will release a new version within today. It won't reconnect if already connected, certainly after verifying the same host and port.
Even though your issue is a good one, I almost ignored it because the issue was opened without MRE. Luckily, I changed my mind before pressing the button.
Hopefully you'll do it correctly next time.
Best Regards,
This is the test debug showing no more connect attempt to the same host:port
Starting AsyncHTTPSRequest_ESP using ESP32_DEV
AsyncTCP_SSL v1.3.1
AsyncHTTPSRequest_Generic v2.1.2
Connecting to WiFi SSID: HueNet1
...
AsyncHTTPSRequest @ IP : 192.168.2.80
[AHTTPS] open: connecting to hostname = worldtimeapi.org:443 <====== New connect attempt
[AHTTPS] _client->connecting to worldtimeapi.org , 443
[AHTTPS] client.connect OK to worldtimeapi.org , 443
**************************************
[AHTTPS] Response Code = HTTP OK
**************************************
abbreviation: EDT
client_ip: 104.247.247.31
datetime: 2022-10-18T13:10:03.030242-04:00
day_of_week: 2
day_of_year: 291
dst: true
dst_from: 2022-03-13T07:00:00+00:00
dst_offset: 3600
dst_until: 2022-11-06T06:00:00+00:00
raw_offset: -18000
timezone: America/Toronto
unixtime: 1666113003
utc_datetime: 2022-10-18T17:10:03.030242+00:00
utc_offset: -04:00
week_number: 42
**************************************
HH[AHTTPS] open: already connected <====== No more connect attempt
H
**************************************
[AHTTPS] Response Code = HTTP OK
**************************************
abbreviation: EDT
client_ip: 104.247.247.31
datetime: 2022-10-18T13:10:31.897109-04:00
day_of_week: 2
day_of_year: 291
dst: true
dst_from: 2022-03-13T07:00:00+00:00
dst_offset: 3600
dst_until: 2022-11-06T06:00:00+00:00
raw_offset: -18000
timezone: America/Toronto
unixtime: 1666113031
utc_datetime: 2022-10-18T17:10:31.897109+00:00
utc_offset: -04:00
week_number: 42
Hi @rjjrbatarao
The new AsyncHTTPSRequest_Generic v2.1.3 has just been released. Your contribution is noted in Contributions and Thanks.
Please test and report any more issue or enhancement.
Best Regards,
Wow thank you very much for the feature your the Man!, I'll definitely will follow the MRE next time, I'll test it with my current code and report how it goes.
This library is great, one problem though when connecting twice on the same host takes a long time, I was wondering if theres a feature you could add to reuse the connection to avoid doing ssl handshake again, this could reduce the request time significantly on second request.