@@ -261,25 +261,18 @@ static void eventport_handle_reassociation(
261261 return ;
262262 }
263263
264- /* Determine which events to re-associate with */
265- uint32_t reassoc_events = entry -> events ;
266- if (entry -> events & PHP_POLL_ET ) {
267- /* Edge-triggered: don't re-associate with events that just fired */
268- reassoc_events &= ~fired_events ;
269- reassoc_events &= ~PHP_POLL_ET ; /* Remove ET flag for port_associate */
270- }
271-
272- if (reassoc_events != 0 ) {
273- /* Re-associate for continued monitoring */
274- int native_events = eventport_events_to_native (reassoc_events );
275- if (port_associate (backend_data -> port_fd , PORT_SOURCE_FD , fd , native_events , entry -> data )
276- != 0 ) {
277- /* Re-association failed - might be due to fd being closed */
278- php_poll_fd_table_remove (backend_data -> fd_table , fd );
279- backend_data -> active_associations -- ;
280- }
281- } else {
282- /* No events to re-associate with */
264+ /* Re-associate for continued monitoring */
265+ int native_events = eventport_events_to_native (entry -> events );
266+ if (native_events == 0 ) {
267+ /* Nothing meaningful to watch - stop tracking */
268+ php_poll_fd_table_remove (backend_data -> fd_table , fd );
269+ backend_data -> active_associations -- ;
270+ return ;
271+ }
272+
273+ if (port_associate (backend_data -> port_fd , PORT_SOURCE_FD , fd , native_events , entry -> data )
274+ != 0 ) {
275+ /* Re-association failed - might be due to fd being closed */
283276 php_poll_fd_table_remove (backend_data -> fd_table , fd );
284277 backend_data -> active_associations -- ;
285278 }
@@ -401,7 +394,8 @@ const php_poll_backend_ops php_poll_backend_eventport_ops = {
401394 .wait = eventport_backend_wait ,
402395 .is_available = eventport_backend_is_available ,
403396 .get_suitable_max_events = eventport_backend_get_suitable_max_events ,
404- .supports_et = true /* Supports both level and edge triggering */
397+ .supports_et = false
405398};
406399
407400#endif /* HAVE_EVENT_PORTS */
401+
0 commit comments