Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't return true with WiFiClientSecureBearSSL::connected() when really disconnected #8330

Merged
merged 10 commits into from
Dec 16, 2022

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Oct 7, 2021

ref. #8329 (comment)
not tested (yet)

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

…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 added the alpha included in alpha release label Oct 28, 2021
@d-a-v d-a-v added this to the 3.1 milestone Jan 3, 2022
@d-a-v d-a-v added the merge-conflict PR has a merge conflict that needs manual correction label Jun 13, 2022
@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
@mcspr mcspr removed the merge-conflict PR has a merge conflict that needs manual correction label Aug 16, 2022
@d-a-v d-a-v merged commit 9dce076 into esp8266:master Dec 16, 2022
@mcspr mcspr deleted the secure-connected-means-read-and-write branch December 16, 2022 11:24
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha included in alpha release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants