mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
async POLLOUT: pollfd change during end of POLLOUT handling change to explicit event reenable
On ESP32 where the timer is on a different thread, otherwise threw occasional back-to-back writes.
This commit is contained in:
parent
faef0b047f
commit
714ba5c9df
1 changed files with 11 additions and 4 deletions
|
@ -353,10 +353,17 @@ user_service:
|
|||
vwsi->handling_pollout = 0;
|
||||
|
||||
/* cannot get leave_pollout_active set after the above */
|
||||
if (!eff && wsi->leave_pollout_active)
|
||||
/* got set inbetween sampling eff and clearing
|
||||
* handling_pollout, force POLLOUT on */
|
||||
lws_calllback_as_writeable(wsi);
|
||||
if (!eff && wsi->leave_pollout_active) {
|
||||
/*
|
||||
* got set inbetween sampling eff and clearing
|
||||
* handling_pollout, force POLLOUT on
|
||||
*/
|
||||
lwsl_debug("leave_pollout_active\n");
|
||||
if (lws_change_pollfd(wsi, 0, LWS_POLLOUT)) {
|
||||
lwsl_info("failed at set pollfd\n");
|
||||
goto bail_die;
|
||||
}
|
||||
}
|
||||
|
||||
vwsi->leave_pollout_active = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue