mirror of
https://github.com/3proxy/3proxy.git
synced 2026-10-17 08:55:49 +08:00
A reload reads the file into a new configuration, allocated from the defaults, and prepares its services without starting them. Only if the whole file is read without an error does it come into force: the old configuration's services stop accepting, the new ones start. On an error everything prepared is dropped and the old configuration, which never stopped, stays in force. Each service holds its configuration until it is freed, after its last client; a configuration no longer in force is released when the last holder lets go (confhold/confput). freeconf() now only releases what a configuration holds, touching nothing global. What runs without a service of its own reads the configuration in force, runconf, rather than conf, which a reload points at the one being read: the resolver, which holds it while it waits (a client resolves with its own service's), the log, the thread pool, the admin pages, which walk the services under config_mutex, and the signal handlers. The users table, havelog and the resolver choice are per configuration now, the resolver applied when the configuration comes into force, so a refused file leaves the users as they were. The log file, the configuration file name, the string table, daemon mode and the filter list belong to the process and are handed from one configuration to the next. Settings left out of a new file go back to their defaults, where before they kept the old values. The gap between the old and the new listening sockets remains: a connection queued on an old service's socket when it closes is reset. Handing the socket over is the next phase. A test case reloads a broken file (nothing changes, alice still gets in, bob from the refused file does not) and a good one (bob only, the service on its new port, the old one closed, a download through the old service finishing whole). 40 reloads, a third refused, under load show no memory errors under AddressSanitizer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| admin.py | ||
| auto.py | ||
| counters.py | ||
| dnspr.py | ||
| httpsrv_auth.py | ||
| httpsrv_files.py | ||
| httpsrv_keepalive.py | ||
| httpsrv_ops.py | ||
| httpsrv_parsing.py | ||
| httpsrv_proxypass.py | ||
| httpsrv_rules.py | ||
| ipv6.py | ||
| ktls.py | ||
| maxconn.py | ||
| parent_failover.py | ||
| parent_ports.py | ||
| parent_weights.py | ||
| pcre.py | ||
| portmap.py | ||
| proxy_http.py | ||
| reload.py | ||
| socks.py | ||
| splice.py | ||
| ssl.py | ||
| timeouts.py | ||
| tlspr.py | ||
| transparent.py | ||