Fixed channel duplicate disconnect handling
This commit is contained in:
parent
75717411df
commit
973a4c30b8
@ -713,9 +713,11 @@ static UINT drdynvc_send(drdynvcPlugin* drdynvc, wStream* s)
|
||||
{
|
||||
case CHANNEL_RC_OK:
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
case CHANNEL_RC_NOT_CONNECTED:
|
||||
Stream_Free(s, TRUE);
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
case CHANNEL_RC_BAD_CHANNEL_HANDLE:
|
||||
Stream_Free(s, TRUE);
|
||||
WLog_ERR(TAG, "VirtualChannelWriteEx failed with CHANNEL_RC_BAD_CHANNEL_HANDLE");
|
||||
@ -1380,7 +1382,8 @@ static UINT drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc, LPVO
|
||||
|
||||
drdynvc->state = DRDYNVC_STATE_CAPABILITIES;
|
||||
|
||||
if (!(drdynvc->thread = CreateThread(NULL, 0, drdynvc_virtual_channel_client_thread, (void*) drdynvc,
|
||||
if (!(drdynvc->thread = CreateThread(NULL, 0, drdynvc_virtual_channel_client_thread,
|
||||
(void*) drdynvc,
|
||||
0, NULL)))
|
||||
{
|
||||
error = ERROR_INTERNAL_ERROR;
|
||||
@ -1401,6 +1404,9 @@ static UINT drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc)
|
||||
{
|
||||
UINT status;
|
||||
|
||||
if (drdynvc->OpenHandle == 0)
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
if (!drdynvc)
|
||||
return CHANNEL_RC_BAD_CHANNEL_HANDLE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user