MINOR: server: ensure connection cleanup on server addr changes

Previously, in srv_update_addr_port(), we forced connection cleanup on
server changes.
This was done in 6318d33ce ("BUG/MEDIUM: connections: force connections
cleanup on server changes").

However, there is no reason we shouldn't have done the same in
srv_update_addr() function, because the end goal is the same: perform
runtime changes on server's address.

The purge_conn hint propagated through the INETADDR server event was
simply there to keep the original behavior (only purge the connection
for events originating from srv_update_addr_port()), but to ensure the
address change is handled the same way for both code paths, we simply
ignore this hint.
This commit is contained in:
Aurelien DARRAGON 2023-12-11 09:15:11 +01:00 committed by Christopher Faulet
parent 545e72546c
commit 2e3a163e47

View File

@ -306,9 +306,8 @@ static struct task *server_atomic_sync(struct task *task, void *context, unsigne
_srv_set_inetaddr_port(srv, &new_addr, _srv_set_inetaddr_port(srv, &new_addr,
data->safe.next.port.svc, data->safe.next.port.map); data->safe.next.port.svc, data->safe.next.port.map);
/* propagate the changes */ /* propagate the changes, force connection cleanup */
if (data->safe.purge_conn) /* force connection cleanup on the given server? */ srv_cleanup_connections(srv);
srv_cleanup_connections(srv);
srv_set_dyncookie(srv); srv_set_dyncookie(srv);
srv_set_addr_desc(srv, 1); srv_set_addr_desc(srv, 1);
} }