From 754d2b4578ffb5bc49b82f9988fdf8e339876743 Mon Sep 17 00:00:00 2001 From: Mykola Stryebkov Date: Tue, 14 Jun 2022 05:37:52 +0100 Subject: [PATCH] eventloop: windows: ssl: remove spin --- lib/plat/windows/windows-service.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/plat/windows/windows-service.c b/lib/plat/windows/windows-service.c index a64501d36..b56ef43de 100644 --- a/lib/plat/windows/windows-service.c +++ b/lib/plat/windows/windows-service.c @@ -41,11 +41,12 @@ _lws_plat_service_forced_tsi(struct lws_context *context, int tsi) if (!pt->fds[n].revents) continue; + unsigned int fds_count = pt->fds_count; m = lws_service_fd_tsi(context, &pt->fds[n], tsi); if (m < 0) return -1; - /* if something closed, retry this slot */ - if (m) + /* if something closed, fds_count will change, retry this slot */ + if (pt->fds_count != fds_count) n--; }