server: Do not call async_terminate() when restarting an already terminated async.

At best this is a no-op. At worst this will emit an extra APC_ASYNC_IO where
the termination (e.g. cancellation) should already have emitted one.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-08-31 19:23:48 -05:00 committed by Alexandre Julliard
parent e4a2bca47b
commit be07015407

View file

@ -387,13 +387,11 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
if (status == STATUS_PENDING) /* restart it */
{
status = async->status;
async->status = STATUS_PENDING;
if (status != STATUS_ALERTED) /* it was terminated in the meantime */
async_terminate( async, status );
else
if (async->status == STATUS_ALERTED)
{
async->status = STATUS_PENDING;
async_reselect( async );
}
}
else
{