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

[mbedTLS] Keep reading/writing partial until "would block" #98995

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented Nov 9, 2024

Them mbedTLS read and write functions will never read or write more than the negotiated fragment length at every iteration (which usually depends on MBEDTLS_SSL_IN_CONTENT_LEN and MBEDTLS_SSL_OUT_CONTENT_LEN).

For this reason, when reading or writing partial data, we must always keep retrying until we receive a "would block" (no bytes read or wrote), or we have fulfilled the read or write.

Fixes #98176

Them mbedTLS read and write functions will never read or write more than
the negotiated fragment length at every iteration (which usually depends
on MBEDTLS_SSL_IN_CONTENT_LEN and MBEDTLS_SSL_OUT_CONTENT_LEN).

For this reason, when reading or writing partial data, we must always
keep retrying until we receive a "would block" (no bytes read or wrote),
or we have fulfilled the read or write.
@Repiteo Repiteo merged commit 21ed922 into godotengine:master Nov 12, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 12, 2024

Thanks!

@Faless Faless deleted the mbetls/insestent_io branch November 12, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WebSockets] Very slow put packet in server->client direction when using TLS WebSocket connection
3 participants