Fix to unreported bug which printed result of getsockopt even in case when there was no socket error.
This commit is contained in:
@ -1244,7 +1244,6 @@ bool service_set_param_value (
|
||||
* 0 error
|
||||
* > 0 position in TYPELIB->type_names +1
|
||||
*/
|
||||
|
||||
static int find_type(
|
||||
typelib_t* tl,
|
||||
const char* needle,
|
||||
|
@ -1070,6 +1070,8 @@ gw_backend_hangup(DCB *dcb)
|
||||
|
||||
len = sizeof(error);
|
||||
if (getsockopt(dcb->fd, SOL_SOCKET, SO_ERROR, &error, &len) == 0)
|
||||
{
|
||||
if (error != 0)
|
||||
{
|
||||
strerror_r(error, buf, 100);
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
@ -1078,6 +1080,7 @@ gw_backend_hangup(DCB *dcb)
|
||||
"Error reported is '%s'.",
|
||||
buf)));
|
||||
}
|
||||
}
|
||||
gwbuf_free(errbuf);
|
||||
goto retblock;
|
||||
}
|
||||
|
Reference in New Issue
Block a user