Store ignored error information
The errors that are ignored by readwritesplit are now stored as the current close reason in the Backend. This allows the information about the error to be retained and it can be used later in the error handler to display the true reason why the connection was closed.
This commit is contained in:
@ -357,6 +357,16 @@ public:
|
||||
*/
|
||||
void set_close_reason(const std::string& reason);
|
||||
|
||||
/**
|
||||
* Get latest close reason
|
||||
*
|
||||
* @return A human-readable reason why the connection was closed
|
||||
*/
|
||||
const std::string& close_reason() const
|
||||
{
|
||||
return m_close_reason;
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
* Internal state of the backend
|
||||
|
Reference in New Issue
Block a user