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;
|
port = service->ports;
|
||||||
while (port)
|
while (port)
|
||||||
{
|
{
|
||||||
if(port->listener)
|
if(poll_remove_dcb(port->listener) == 0)
|
||||||
{
|
|
||||||
dcb_close(port->listener);
|
|
||||||
port->listener = NULL;
|
|
||||||
listeners++;
|
listeners++;
|
||||||
}
|
|
||||||
port = port->next;
|
port = port->next;
|
||||||
}
|
}
|
||||||
service->state = SERVICE_STATE_STOPPED;
|
service->state = SERVICE_STATE_STOPPED;
|
||||||
@ -564,7 +560,8 @@ int listeners = 0;
|
|||||||
port = service->ports;
|
port = service->ports;
|
||||||
while (port)
|
while (port)
|
||||||
{
|
{
|
||||||
listeners += serviceStartPort(service,port);
|
if(poll_add_dcb(port->listener) == 0)
|
||||||
|
listeners++;
|
||||||
port = port->next;
|
port = port->next;
|
||||||
}
|
}
|
||||||
service->state = SERVICE_STATE_STARTED;
|
service->state = SERVICE_STATE_STARTED;
|
||||||
|
Reference in New Issue
Block a user