Fixed channel duplicate disconnect handling
This commit is contained in:
parent
d784954bca
commit
1761a66b5e
@ -682,7 +682,7 @@ static UINT rail_virtual_channel_event_connected(railPlugin* rail, LPVOID pData,
|
||||
}
|
||||
|
||||
if (!(rail->thread = CreateThread(NULL, 0,
|
||||
rail_virtual_channel_client_thread, (void*) rail, 0,
|
||||
rail_virtual_channel_client_thread, (void*) rail, 0,
|
||||
NULL)))
|
||||
{
|
||||
WLog_ERR(TAG, "CreateThread failed!");
|
||||
@ -703,6 +703,9 @@ static UINT rail_virtual_channel_event_disconnected(railPlugin* rail)
|
||||
{
|
||||
UINT rc;
|
||||
|
||||
if (rail->OpenHandle == 0)
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
if (MessageQueue_PostQuit(rail->queue, 0)
|
||||
&& (WaitForSingleObject(rail->thread, INFINITE) == WAIT_FAILED))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user