diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c index 2a330f763..1fea40303 100644 --- a/server/shadow/shadow_client.c +++ b/server/shadow/shadow_client.c @@ -1747,6 +1747,12 @@ BOOL shadow_client_accepted(freerdp_listener* listener, freerdp_peer* peer) freerdp_peer_context_free(peer); return FALSE; } + else + { + /* Close the thread handle to make it detached. */ + CloseHandle(client->thread); + client->thread = NULL; + } return TRUE; }