Yield in connection wait loops to reduce processor use.

Patch by Andrey Vasilkin on mailing list.
This commit is contained in:
Armin Novak 2019-01-18 13:03:36 +01:00
parent b08505cbe0
commit f65b94ed84
2 changed files with 3 additions and 0 deletions

View File

@ -290,6 +290,8 @@ BOOL rdp_recv_deactivate_all(rdpRdp* rdp, wStream* s)
if (freerdp_shall_disconnect(rdp->instance))
break;
SwitchToThread();
}
return TRUE;

View File

@ -336,6 +336,7 @@ BOOL rdp_client_connect(rdpRdp* rdp)
return FALSE;
}
SwitchToThread();
}
return TRUE;