261118.11 65ad42caa120f8b29aceff528e148e26d1fdd1a2 The default address's server stays up, so the web address answers
commit time warp
The web address answered only while a tree was served. A forge link on a page leads there, and with no server it was a dead end.
The server on the default address now stays up when its last tree goes. --restart, which the login units run, starts one there with no tree when none runs, and replaces one with no tree by the current binary, as it does a server with trees. A tree joins it as any server. Kill server and --kill still stop it; the next login brings it back.
The web address now starts before the first tree is adopted. The tree's warm-up read the cache's paths while startWeb set them, a race the new tests on the default address showed.
Changes to systemd/. All files
systemd/dev.service.in
@@ -2,7 +2,8 @@ # name, from login to logout. Enable it with: # systemctl --user enable @NAME@-dev # --restart starts a server for each address whose registry links a .LOCK-# and names this build. The package's units serve the trees its binary+# and names this build, and one on the build's default address with no+# tree, so the web address answers. The package's units serve the trees its binary # served last, so this unit runs beside them. # Stopping the unit sends its servers SIGTERM, which keeps every .LOCK. [Unit]
systemd/system@.service.in
@@ -1,4 +1,5 @@-# The system template serves a user's .LOCK trees from boot, before login.+# The system template serves a user's .LOCK trees from boot, before login,+# and the web address beside the user's default address. # Enable it for one user with: sudo systemctl enable @NAME@@<user> # The capability lets it bind port 80, as the package's binary may. # While the user unit runs in that user's session it serves the same
systemd/user.service.in
@@ -1,6 +1,7 @@ # The user unit serves the trees that .LOCK files name, from login to # logout. Enable it with: systemctl --user enable @NAME@-# --restart starts a server for each address whose registry links a .LOCK.+# --restart starts a server for each address whose registry links a .LOCK,+# and one on the default address with no tree, so the web address answers. # Stopping the unit sends its servers SIGTERM, which keeps every .LOCK. # While the system template runs for this user it serves the same trees # from boot, so this unit stands aside.