Added log error or ss_dassert instead of silent returning

This commit is contained in:
Massimiliano Pinto
2013-09-04 15:31:04 +02:00
parent 5c48239372
commit b01cf2365e
4 changed files with 30 additions and 13 deletions

View File

@ -152,10 +152,21 @@ static int gw_read_backend_event(DCB *dcb) {
CHK_SESSION(dcb->session);
if (dcb->session->client == NULL) {
dcb->state = DCB_STATE_DISCONNECTED;
skygw_log_write(
LOGFILE_ERROR,
"%lu [gw_read_backend_event] client dcb is NULL for backend dcb %d.",
pthread_self(),
dcb->fd);
dcb->state = DCB_STATE_DISCONNECTED;
return 1;
}
client_protocol = SESSION_PROTOCOL(dcb->session, MySQLProtocol);
} else {
skygw_log_write(
LOGFILE_ERROR,
"%lu [gw_read_backend_event] dcb->session is NULL for backend dcb %d.",
pthread_self(),
dcb->fd);
dcb->state = DCB_STATE_DISCONNECTED;
return 1;
}