Log server name in error message
This makes it clear which server failed.
This commit is contained in:
parent
11368e5ed0
commit
87f97a16c3
@ -68,8 +68,8 @@ struct AddressInfo
|
||||
};
|
||||
static AddressInfo get_ip_string_and_port(const sockaddr_storage* sa);
|
||||
static bool gw_connection_established(DCB* dcb);
|
||||
static bool gw_auth_is_complete(DCB* dcb);
|
||||
json_t* gw_json_diagnostics(DCB* dcb);
|
||||
static bool gw_auth_is_complete(DCB* dcb);
|
||||
json_t* gw_json_diagnostics(DCB* dcb);
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@ -604,16 +604,20 @@ static std::string get_detailed_error(DCB* dcb)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
|
||||
ss << " (" << dcb->server->name();
|
||||
|
||||
if (int err = gw_getsockerrno(dcb->fd))
|
||||
{
|
||||
ss << " (" << err << ", " << mxs_strerror(err) << ")";
|
||||
ss << ": " << err << ", " << mxs_strerror(err);
|
||||
}
|
||||
else if (dcb->is_fake_event)
|
||||
{
|
||||
// Fake events should not have TCP socket errors
|
||||
ss << " (Generated event)";
|
||||
ss << ": Generated event";
|
||||
}
|
||||
|
||||
ss << ")";
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user