server: proxy: remove unnecessary function handle_client_disconnection
authorkubistika <kmizrachi18@gmail.com>
Tue, 16 Jul 2019 13:18:26 +0000 (16:18 +0300)
committerkubistika <kmizrachi18@gmail.com>
Tue, 16 Jul 2019 13:20:06 +0000 (16:20 +0300)
server/proxy/pf_server.c

index de55c3d..5e4c782 100644 (file)
 
 #define TAG PROXY_TAG("server")
 
-static void pf_server_handle_client_disconnection(freerdp_peer* client)
-{
-       pServerContext* ps = (pServerContext*)client->context;
-       rdpContext* pc = (rdpContext*) ps->pdata->pc;
-       proxyData* pdata = ps->pdata;
-       WLog_INFO(TAG, "Connection with %s was closed; closing proxy's client <> target server connection %s",
-                 client->hostname, pc->settings->ServerHostname);
-       /* Mark connection closed for sContext */
-       SetEvent(pdata->connectionClosed);
-       freerdp_abort_connect(pc->instance);
-       /* Close connection to remote host */
-       WLog_DBG(TAG, "Waiting for proxy's client thread to finish");
-       WaitForSingleObject(ps->thread, INFINITE);
-       CloseHandle(ps->thread);
-       ps->thread = NULL;
-}
-
 static BOOL pf_server_parse_target_from_routing_token(rdpContext* context,
         char** target, DWORD* port)
 {
@@ -366,11 +349,6 @@ fail:
 
        if (ps->gfx)
                rdpgfx_server_context_free(ps->gfx);
-               
-       if (client->connected && !pf_common_connection_aborted_by_peer(pdata))
-       {
-               pf_server_handle_client_disconnection(client);
-       }
 
        pc = (rdpContext*) pdata->pc;
        freerdp_client_stop(pc);