MXS-2122: Close listener socket on destruction
Even though directly closing the socket is not very neat in the architectural sense of things, it allows the best of both worlds: the socket is instantly closed and is open for reuse while the listener struct is still available as a reference. This change needs to be revised when the listeners are refactored into separate objects. Updated documentation to reflect the change in behavior.
This commit is contained in:
@ -1547,8 +1547,8 @@ Example: create listener my-service my-new-listener 192.168.0.101 4006
|
||||
|
||||
You can destroy created listeners with the `destroy listener` command. This will
|
||||
remove the persisted configuration and it will not be created on the next
|
||||
startup. The listener is stopped but it will remain a part of the runtime
|
||||
configuration until the next restart.
|
||||
startup. The listener is destroyed and the listening port is immediately
|
||||
available for reuse.
|
||||
|
||||
```
|
||||
destroy listener - Destroy a listener
|
||||
@ -1558,7 +1558,7 @@ Usage: destroy listener SERVICE NAME
|
||||
Parameters:
|
||||
NAME Listener to destroy
|
||||
|
||||
The listener is stopped and it will be removed on the next restart of MaxScale
|
||||
The listener is deleted
|
||||
|
||||
Example: destroy listener my-listener
|
||||
```
|
||||
@ -1615,9 +1615,7 @@ Example: alter monitor my-monitor user=maxuser password=maxpwd
|
||||
### Destroying Monitors
|
||||
|
||||
To destroy a monitor, use the `destroy monitor` command. All servers need to be
|
||||
removed from the monitor before it can be destroyed. Only created monitors
|
||||
should be destroyed and they will remain a part of the runtime configuration
|
||||
until the next restart.
|
||||
removed from the monitor before it can be destroyed.
|
||||
|
||||
```
|
||||
destroy monitor - Destroy a monitor
|
||||
@ -1627,7 +1625,7 @@ Usage: destroy monitor NAME
|
||||
Parameters:
|
||||
NAME Monitor to destroy
|
||||
|
||||
The monitor is stopped and it will be removed on the next restart of MaxScale
|
||||
The monitor is destroyed
|
||||
|
||||
Example: destroy monitor my-monitor
|
||||
```
|
||||
|
@ -523,10 +523,7 @@ The monitor must be unlinked from all servers before it can be destroyed.
|
||||
|
||||
`Usage: destroy listener <service> <name>`
|
||||
|
||||
Destroying a monitor causes it to be removed on the next restart. Destroying a
|
||||
listener at runtime stops it from accepting new connections but it will still be
|
||||
bound to the listening socket. This means that new listeners cannot be created
|
||||
to replace destroyed listeners without restarting MaxScale.
|
||||
Destroying a listener closes the listening socket, opening it up for reuse.
|
||||
|
||||
### destroy service
|
||||
|
||||
|
Reference in New Issue
Block a user