Add is_active helper to Backend
The Backend now provides a helper function for checking if the SERFER_REF is still active. Also renamed the close_type enum values.
This commit is contained in:
@ -53,7 +53,7 @@ void Backend::close(close_type type)
|
||||
clear_state(IN_USE);
|
||||
set_state(CLOSED);
|
||||
|
||||
if (type == FATAL)
|
||||
if (type == CLOSE_FATAL)
|
||||
{
|
||||
set_state(FATAL_FAILURE);
|
||||
}
|
||||
@ -248,6 +248,11 @@ bool Backend::in_use() const
|
||||
return m_state & IN_USE;
|
||||
}
|
||||
|
||||
bool Backend::is_active() const
|
||||
{
|
||||
return SERVER_REF_IS_ACTIVE(m_backend);
|
||||
}
|
||||
|
||||
bool Backend::is_waiting_result() const
|
||||
{
|
||||
return m_state & WAITING_RESULT;
|
||||
|
||||
Reference in New Issue
Block a user