commit 4aa53df3b6bf8fecf7d07c111b263fcee76ed61f
parent 8b9f7a6c125792573af01d6487713ab296a14f4f
Author: Joris Vink <joris@coders.se>
Date: Mon, 17 Aug 2020 16:45:10 +0200
Make sure curl state transitions work properly.
Diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/curl.c b/src/curl.c
@@ -567,10 +567,14 @@ curl_socket(CURL *easy, curl_socket_t fd, int action, void *arg, void *sock)
break;
case CURL_POLL_OUT:
case CURL_POLL_INOUT:
- if (fdc->scheduled == 0) {
- kore_platform_event_level_all(fd, fdc);
- fdc->scheduled = 1;
+ if (fdc->scheduled) {
+ kore_platform_disable_read(fd);
+#if !defined(__linux__)
+ kore_platform_disable_write(fd);
+#endif
}
+ fdc->scheduled = 1;
+ kore_platform_event_level_all(fd, fdc);
break;
case CURL_POLL_REMOVE:
if (fdc->scheduled) {