mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-26 19:33:34 +08:00
fix [core]: 'invalid hHandle' errors
peer_recv_tpkt_pdu calls freerdp_shall_disconnect_context which calls WaitForSingleObject. Server side the abortEvent is NULL and therefore every call triggered the following message: ``` [ERROR:com.winpr.sync.wait] [wait.c|WaitForSingleObjectEx|174] - invalid hHandle. ```
This commit is contained in:
parent
052c525e09
commit
a9deecc99b
@ -565,7 +565,7 @@ BOOL freerdp_shall_disconnect(freerdp* instance)
|
||||
|
||||
BOOL freerdp_shall_disconnect_context(rdpContext* context)
|
||||
{
|
||||
if (!context)
|
||||
if (!context || !context->abortEvent)
|
||||
return FALSE;
|
||||
|
||||
if (WaitForSingleObject(context->abortEvent, 0) != WAIT_OBJECT_0)
|
||||
|
@ -47,8 +47,9 @@ BOOL utils_str_copy(const char* value, char** dst)
|
||||
BOOL utils_abort_connect(rdpContext* context)
|
||||
{
|
||||
WINPR_ASSERT(context);
|
||||
|
||||
return SetEvent(context->abortEvent);
|
||||
if (context->abortEvent)
|
||||
return SetEvent(context->abortEvent);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL utils_reset_abort(rdpContext* context)
|
||||
|
Loading…
Reference in New Issue
Block a user