From 0ede4b54feb682373306610b5c0620268c8211da Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sun, 24 Mar 2024 18:45:05 +0800 Subject: [PATCH] 1 --- server/wsproxy/mastermgr.cc | 11 ++--------- server/wsproxy/types.h | 13 +++++++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/server/wsproxy/mastermgr.cc b/server/wsproxy/mastermgr.cc index 4988576..ce77cc9 100644 --- a/server/wsproxy/mastermgr.cc +++ b/server/wsproxy/mastermgr.cc @@ -19,15 +19,6 @@ #include "downstreammgr.h" #include "GCListener.h" -struct HttpTunnelRequest -{ - int socket_handle = 0; - long long context_id = 0; - f8::TimerWp timer_wp; - std::shared_ptr request; -}; - - class RequestTarget { public: @@ -309,6 +300,8 @@ void MasterMgr::AddHttpTunnelRequest(int socket_handle, std::shared_ptrRemoveHttpTunnelRequest(req->socket_handle); + } else if (ALLOC_TARGET_SERVER_SUCCESS_TIMER_EVENT == event) { + MasterMgr::Instance()->RemoveHttpTunnelRequest(req->socket_handle); } } ); diff --git a/server/wsproxy/types.h b/server/wsproxy/types.h index a6061ab..56581e6 100644 --- a/server/wsproxy/types.h +++ b/server/wsproxy/types.h @@ -1,5 +1,10 @@ #pragma once +namespace f8 +{ + class JsonHttpRequest; +} + struct PerfMonitor { int max_run_delay_time = 0; @@ -11,3 +16,11 @@ struct PerfMonitor long long in_data_size = 0; long long read_count = 0; }; + +struct HttpTunnelRequest +{ + int socket_handle = 0; + long long context_id = 0; + f8::TimerWp timer_wp; + std::shared_ptr request; +};