Cleaned up code based on the review of the code.
This commit is contained in:
@ -1404,7 +1404,10 @@ int gw_MySQLListener(DCB *listen_dcb,
|
||||
if (setsockopt(l_so, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(one)) != 0)
|
||||
{
|
||||
char errbuf[STRERROR_BUFLEN];
|
||||
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR, "Error: Failed to set socket options. Error %d: %s", errno, strerror_r(errno, errbuf, sizeof (errbuf)))));
|
||||
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
|
||||
"Error: Failed to set socket options. Error %d: %s",
|
||||
errno,
|
||||
strerror_r(errno, errbuf, sizeof(errbuf)))));
|
||||
}
|
||||
|
||||
if (is_tcp)
|
||||
@ -1412,7 +1415,10 @@ int gw_MySQLListener(DCB *listen_dcb,
|
||||
char errbuf[STRERROR_BUFLEN];
|
||||
if (setsockopt(l_so, IPPROTO_TCP, TCP_NODELAY, (char *) &one, sizeof(one)) != 0)
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR, "Error: Failed to set socket options. Error %d: %s", errno, strerror_r(errno, errbuf, sizeof (errbuf)))));
|
||||
LOGIF(LE, (skygw_log_write_flush(LOGFILE_ERROR,
|
||||
"Error: Failed to set socket options. Error %d: %s",
|
||||
errno,
|
||||
strerror_r(errno, errbuf, sizeof(errbuf)))));
|
||||
}
|
||||
}
|
||||
// set NONBLOCKING mode
|
||||
|
Reference in New Issue
Block a user