gateway.c
file_write_footer, added checks for the case of failed memory allocation. service.c serviceRestart, added check for return value of poll_add_dcb. In failure, service is not moved to SESSION_STATE_LISTENER state and listener counter is not increased.
This commit is contained in:
@ -273,10 +273,10 @@ int listeners = 0;
|
||||
port = service->ports;
|
||||
while (port)
|
||||
{
|
||||
poll_add_dcb(port->listener);
|
||||
port->listener->session->state = SESSION_STATE_LISTENER;
|
||||
listeners++;
|
||||
|
||||
if (poll_add_dcb(port->listener) == 0) {
|
||||
port->listener->session->state = SESSION_STATE_LISTENER;
|
||||
listeners++;
|
||||
}
|
||||
port = port->next;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user