mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
Solve weak_ptr issue
This commit is contained in:
parent
0339a4f963
commit
6643b4188a
2 changed files with 10 additions and 4 deletions
|
@ -53,8 +53,9 @@ namespace proxy
|
|||
public:
|
||||
HTTPProxyHandler(HTTPProxyServer * parent, boost::asio::ip::tcp::socket * sock) :
|
||||
I2PServiceHandler(parent), m_sock(sock)
|
||||
{ AsyncSockRead(); EnterState(GET_METHOD); }
|
||||
{ EnterState(GET_METHOD); }
|
||||
~HTTPProxyHandler() { Terminate(); }
|
||||
void Handle () { AsyncSockRead(); }
|
||||
};
|
||||
|
||||
void HTTPProxyHandler::AsyncSockRead()
|
||||
|
@ -255,7 +256,9 @@ namespace proxy
|
|||
if (!ecode)
|
||||
{
|
||||
LogPrint(eLogDebug,"--- HTTP Proxy accepted");
|
||||
AddHandler(std::make_shared<HTTPProxyHandler> (this, socket));
|
||||
auto handler = std::make_shared<HTTPProxyHandler> (this, socket);
|
||||
AddHandler(handler);
|
||||
handler->Handle();
|
||||
Accept();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue