Browse Source

* HTTPProxy.cpp : unwrap AsyncSockRead()

pull/509/merge
hagen 9 years ago
parent
commit
a5f49550b3
  1. 8
      HTTPProxy.cpp

8
HTTPProxy.cpp

@ -81,13 +81,13 @@ namespace proxy {
void HTTPReqHandler::AsyncSockRead() void HTTPReqHandler::AsyncSockRead()
{ {
LogPrint(eLogDebug, "HTTPProxy: async sock read"); LogPrint(eLogDebug, "HTTPProxy: async sock read");
if(m_sock) { if (!m_sock) {
LogPrint(eLogError, "HTTPProxy: no socket for read");
return;
}
m_sock->async_receive(boost::asio::buffer(m_http_buff, http_buffer_size), m_sock->async_receive(boost::asio::buffer(m_http_buff, http_buffer_size),
std::bind(&HTTPReqHandler::HandleSockRecv, shared_from_this(), std::bind(&HTTPReqHandler::HandleSockRecv, shared_from_this(),
std::placeholders::_1, std::placeholders::_2)); std::placeholders::_1, std::placeholders::_2));
} else {
LogPrint(eLogError, "HTTPProxy: no socket for read");
}
} }
void HTTPReqHandler::Terminate() { void HTTPReqHandler::Terminate() {

Loading…
Cancel
Save