ServiceStop only removed DCBs from the polling system
This removes the need to establish new DCBs for each of the listeners while still blocking new session creation for a service which is shut down. The client will not receive an error and the connection will be accepted when the service is restarted.
This commit is contained in:
@ -534,12 +534,8 @@ int listeners = 0;
|
||||
port = service->ports;
|
||||
while (port)
|
||||
{
|
||||
if(port->listener)
|
||||
{
|
||||
dcb_close(port->listener);
|
||||
port->listener = NULL;
|
||||
if(poll_remove_dcb(port->listener) == 0)
|
||||
listeners++;
|
||||
}
|
||||
port = port->next;
|
||||
}
|
||||
service->state = SERVICE_STATE_STOPPED;
|
||||
@ -564,7 +560,8 @@ int listeners = 0;
|
||||
port = service->ports;
|
||||
while (port)
|
||||
{
|
||||
listeners += serviceStartPort(service,port);
|
||||
if(poll_add_dcb(port->listener) == 0)
|
||||
listeners++;
|
||||
port = port->next;
|
||||
}
|
||||
service->state = SERVICE_STATE_STARTED;
|
||||
|
Reference in New Issue
Block a user