Don't return `true` with `WiFiClientSecureBearSSL::connected()` when really disconnected by mcspr · Pull Request #8330 · esp8266/Arduino

added 2 commits

October 7, 2021 16:58
…sconnected

Apply the same condition as with normal WiFiClient - we are not connected
when it's not possible to both write and read.

Implement separate methods for actual connection status and the internal
ssl engine status and update methods that were previously using available()
for this purpose

Update examples to check available() when the intent is to only read the
data and not interact with the client in any other way. Also, use connect()
as a way to notify errors, no need to check things twice

d-a-v

@d-a-v d-a-v added this to the 3.1 milestone

Jan 3, 2022

@mcspr

@mcspr

@mcspr

@mcspr

@mcspr mcspr changed the title Don't return true with WiFiClientSecureBearSSL::connected() when disconnected Don't return true with WiFiClientSecureBearSSL::connected() when really disconnected

Jul 2, 2022

@d-a-v

d-a-v

@mcspr mcspr deleted the secure-connected-means-read-and-write branch

December 16, 2022 11:24

@mcspr mcspr mentioned this pull request

Mar 16, 2023

1 task

hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request

Nov 18, 2024
…really disconnected (esp8266#8330)

* Don't return `true` with WiFiClientSecureBearSSL::connected() when disconnected

Apply the same condition as with normal WiFiClient - we are not connected
when it's not possible to both write and read.

Implement separate methods for actual connection status and the internal
ssl engine status and update methods that were previously using available()
for this purpose

Update examples to check available() when the intent is to only read the
data and not interact with the client in any other way. Also, use connect()
as a way to notify errors, no need to check things twice