diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-29 00:34:40 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-29 00:34:40 +0100 |
| commit | 952da5949f677e932f2a48a5474210df571472fb (patch) | |
| tree | d33525d29ee18b65b9e5df39d2e2fb1f5a868ca2 /DESIGN | |
| parent | f08e7473ac51a024f49e5101fbc5e150fecef2d4 (diff) | |
Diffstat (limited to 'DESIGN')
| -rw-r--r-- | DESIGN | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -214,6 +214,16 @@ packet arriving in that window created the torrent, and the saved state for it | |||
| 214 | was then dropped on the exactmatch add_torrent_from_saved_state bails on, | 214 | was then dropped on the exactmatch add_torrent_from_saved_state bails on, |
| 215 | losing that torrent's completed count. | 215 | losing that torrent's completed count. |
| 216 | 216 | ||
| 217 | A udp address somebody else holds is warned about and bound all the same. | ||
| 218 | Linux permits the second bind when both sockets set SO_REUSEADDR, which the | ||
| 219 | tracker always does, and FreeBSD when both asked to share the port, which it | ||
| 220 | does for a group of workers. The two then take or split each other's datagrams | ||
| 221 | without either noticing. Every udp entry is probed before the first of them is | ||
| 222 | bound, with a socket that asks for no sharing, so that an overlap within the | ||
| 223 | tracker's own configuration is not mistaken for a stranger. TCP is not probed: | ||
| 224 | there the bind itself fails unless a balanced group was asked for, and on | ||
| 225 | Linux a probe would also trip over the connections a restart leaves behind. | ||
| 226 | |||
| 217 | Teardown stops the cleaner first. It is the one worker that calls into other | 227 | Teardown stops the cleaner first. It is the one worker that calls into other |
| 218 | modules, accesslist_cleanup and stats_cleanup, so stopping it after them left | 228 | modules, accesslist_cleanup and stats_cleanup, so stopping it after them left |
| 219 | it locking a mutex accesslist_deinit had already destroyed: five shutdowns in | 229 | it locking a mutex accesslist_deinit had already destroyed: five shutdowns in |
