HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.03k stars 648 forks source link

[hl] Ignore WANT_READ/WANT_WRITE errors when the socket is known to b… #11655

Open Apprentice-Alchemist opened 2 months ago

Apprentice-Alchemist commented 2 months ago

…e blocking.

Sometimes mbedtls returns WANT_READ/WANT_WRITE errors (the case I encountered while working on https://github.com/HaxeFoundation/hashlink/pull/681 seems to be due to session tickets). These should be interpreted as "retry when more data is known to be available", but there is no good way to express that in the current api when the socket is blocking other than returning zero.

Together with https://github.com/HaxeFoundation/hashlink/pull/681 this should be enough to get rid of the HL+macOS failures in https://github.com/HaxeFoundation/haxe/pull/11638.