virtual bool close(boost::system::error_code &error_code) {
boost::mutex::scoped_lock lock(ssl_mutex);
if (my_socket->lowest_layer().is_open()) {
- my_socket->lowest_layer().shutdown(boost::asio::ip::tcp::socket::shutdown_both, error_code);
- if (unlikely(error_code)) {
- boost::format fmt("Thread ID[%d] ssl_socket lowest_layer shutdown fail: %s");
- fmt % boost::this_thread::get_id() % error_code.message();
- Logger::putLogInfo(LOG_CAT_L7VSD_SESSION, 999, fmt.str(), __FILE__, __LINE__);
- }
-
my_socket->lowest_layer().close(error_code);
if (error_code) {
boost::format fmt("Thread ID[%d] ssl_socket lowest_layer close fail: %s");
//reschedule is off
else {
//set return status
- status = CLIENT_DISCONNECT;
+ status = FINALIZE;
}
}
}
session_data_ptr = session_thread_it->second;
//set return status
- status = CLIENT_DISCONNECT;
+ status = FINALIZE;
//set last status
session_data_ptr->last_status = status;
}
/*------DEBUG LOG END------*/
- status = CLIENT_DISCONNECT;
+ status = FINALIZE;
} catch (int e) {
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
// no reschedule mode
// set end_flag ON and disconnect the client
threaddata->end_flag = END_FLAG_ON;
- status = CLIENT_DISCONNECT;
+ status = FINALIZE;
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
boost::format formatter("function : protocol_module_base::EVENT_TAG "
// no reschedule mode
// set end_flag ON and disconnect the client
threaddata->end_flag = END_FLAG_ON;
- status = CLIENT_DISCONNECT;
+ status = FINALIZE;
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
boost::format formatter("function : protocol_module_base::EVENT_TAG "
// set end_flag ON
threaddata->end_flag = END_FLAG_ON;
- status = CLIENT_DISCONNECT;
+ status = FINALIZE;
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {