UltraMonkey-L7 V3(multi-thread implementation)
Révision | 97835e59eeadc52251dba4d0aef77c9213af9a40 (tree) |
---|---|
l'heure | 2012-01-23 18:17:59 |
Auteur | Michiro HIBARI <hibari@user...> |
Commiter | Michiro HIBARI |
@@ -105,13 +105,6 @@ public: | ||
105 | 105 | virtual bool close(boost::system::error_code &error_code) { |
106 | 106 | boost::mutex::scoped_lock lock(ssl_mutex); |
107 | 107 | if (my_socket->lowest_layer().is_open()) { |
108 | - my_socket->lowest_layer().shutdown(boost::asio::ip::tcp::socket::shutdown_both, error_code); | |
109 | - if (unlikely(error_code)) { | |
110 | - boost::format fmt("Thread ID[%d] ssl_socket lowest_layer shutdown fail: %s"); | |
111 | - fmt % boost::this_thread::get_id() % error_code.message(); | |
112 | - Logger::putLogInfo(LOG_CAT_L7VSD_SESSION, 999, fmt.str(), __FILE__, __LINE__); | |
113 | - } | |
114 | - | |
115 | 108 | my_socket->lowest_layer().close(error_code); |
116 | 109 | if (error_code) { |
117 | 110 | boost::format fmt("Thread ID[%d] ssl_socket lowest_layer close fail: %s"); |
@@ -2088,7 +2088,7 @@ protocol_module_base::EVENT_TAG protocol_module_ip::handle_realserver_select( | ||
2088 | 2088 | //reschedule is off |
2089 | 2089 | else { |
2090 | 2090 | //set return status |
2091 | - status = CLIENT_DISCONNECT; | |
2091 | + status = FINALIZE; | |
2092 | 2092 | } |
2093 | 2093 | } |
2094 | 2094 | } |
@@ -3112,7 +3112,7 @@ protocol_module_base::EVENT_TAG protocol_module_ip::handle_sorryserver_connectio | ||
3112 | 3112 | session_data_ptr = session_thread_it->second; |
3113 | 3113 | |
3114 | 3114 | //set return status |
3115 | - status = CLIENT_DISCONNECT; | |
3115 | + status = FINALIZE; | |
3116 | 3116 | |
3117 | 3117 | //set last status |
3118 | 3118 | session_data_ptr->last_status = status; |
@@ -3868,7 +3868,7 @@ protocol_module_base::EVENT_TAG protocol_module_sessionless::handle_sorryserver_ | ||
3868 | 3868 | } |
3869 | 3869 | /*------DEBUG LOG END------*/ |
3870 | 3870 | |
3871 | - status = CLIENT_DISCONNECT; | |
3871 | + status = FINALIZE; | |
3872 | 3872 | } catch (int e) { |
3873 | 3873 | /*-------- DEBUG LOG --------*/ |
3874 | 3874 | if (unlikely(LOG_LV_DEBUG == getloglevel())) { |
@@ -1674,7 +1674,7 @@ protocol_module_base::EVENT_TAG protocol_module_sslid::handle_realserver_select( | ||
1674 | 1674 | // no reschedule mode |
1675 | 1675 | // set end_flag ON and disconnect the client |
1676 | 1676 | threaddata->end_flag = END_FLAG_ON; |
1677 | - status = CLIENT_DISCONNECT; | |
1677 | + status = FINALIZE; | |
1678 | 1678 | /*-------- DEBUG LOG --------*/ |
1679 | 1679 | if (unlikely(LOG_LV_DEBUG == getloglevel())) { |
1680 | 1680 | boost::format formatter("function : protocol_module_base::EVENT_TAG " |
@@ -1749,7 +1749,7 @@ protocol_module_base::EVENT_TAG protocol_module_sslid::handle_realserver_select( | ||
1749 | 1749 | // no reschedule mode |
1750 | 1750 | // set end_flag ON and disconnect the client |
1751 | 1751 | threaddata->end_flag = END_FLAG_ON; |
1752 | - status = CLIENT_DISCONNECT; | |
1752 | + status = FINALIZE; | |
1753 | 1753 | /*-------- DEBUG LOG --------*/ |
1754 | 1754 | if (unlikely(LOG_LV_DEBUG == getloglevel())) { |
1755 | 1755 | boost::format formatter("function : protocol_module_base::EVENT_TAG " |
@@ -2340,7 +2340,7 @@ protocol_module_base::EVENT_TAG protocol_module_sslid::handle_sorryserver_connec | ||
2340 | 2340 | |
2341 | 2341 | // set end_flag ON |
2342 | 2342 | threaddata->end_flag = END_FLAG_ON; |
2343 | - status = CLIENT_DISCONNECT; | |
2343 | + status = FINALIZE; | |
2344 | 2344 | |
2345 | 2345 | /*-------- DEBUG LOG --------*/ |
2346 | 2346 | if (unlikely(LOG_LV_DEBUG == getloglevel())) { |