MXS-1929: Remove listener from service and workers

When a listener is removed from a service, it should also be removed from
any workers it has been added to. This guarantees that if the opening of
the listener was successful, no requests will be accepted on it after the
removal of the listener.
This commit is contained in:
Markus Mäkelä
2018-07-18 08:16:38 +03:00
parent 4069072164
commit aeb94cbc9e
2 changed files with 37 additions and 24 deletions

View File

@ -87,6 +87,18 @@ SERV_LISTENER* serviceCreateListener(SERVICE *service, const char *name,
unsigned short port, const char *authenticator,
const char *options, SSL_LISTENER *ssl);
/**
* @brief Remove a listener from use
*
* @note This does not free the memory
*
* @param service Service that owns the listener
* @param char Name of the listener to remove
*
* @return True if listener was found and removed
*/
bool service_remove_listener(SERVICE *service, const char* target);
void serviceRemoveBackend(SERVICE *service, const SERVER *server);
/**