Alexandre Julliard (@julliard) commented about server/handle.c:
if (entry->access & RESERVED_CLOSE_PROTECT) return STATUS_HANDLE_NOT_CLOSABLE; obj = entry->ptr; if (!obj->ops->close_handle( obj, process, handle )) return STATUS_HANDLE_NOT_CLOSABLE;
- if (obj->handle_count > 1 && get_obj_handle_count( process, obj ) == 1)
- {
/* Handle a special case when the last object handle in the given process is closed.
* If this is the last object handle overall that is handled in object's close_handle and
* destruction. */
cancel_asyncs_on_handles_closed( process, obj );
- }
This doesn't belong in the generic handle code. It should be handled in the close_handle callback of objects that support asyncs.