void redis_connection::call_disconnection_handler() { if (m_disconnection_handler) { __CPP_REDIS_LOG(debug, "cpp_redis::network::redis_connection calls disconnection handler"); m_disconnection_handler(*this); } }
void redis_connection::tcp_client_disconnection_handler(network::tcp_client&) { std::lock_guard<std::mutex> lock(m_disconnection_handler_mutex); if (m_disconnection_handler) m_disconnection_handler(*this); }
void tcp_client::io_service_disconnection_handler(network::io_service&) { m_is_connected = false; close(m_fd); if (m_disconnection_handler) m_disconnection_handler(*this); }
void tcp_client::process_disconnection(void) { m_is_connected = false; m_socket.close(); std::lock_guard<std::mutex> lock(m_disconnection_handler_mutex); if (m_disconnection_handler) m_disconnection_handler(*this); }
//! //! Call disconnection handler //! void tcp_client::call_disconnection_handler(void) { if (m_disconnection_handler) { m_disconnection_handler(); } }