Watch
1
0
Fork
You've already forked souveraine
0

the face draws: relative asset paths over loopback, and a dead socket stops being a gate

This commit is contained in:
Fimeg 2026-08-06 11:18:23 -04:00
commit 7f294a5fa2
2 changed files with 19 additions and 2 deletions

View file

@ -24,7 +24,7 @@
<body>
<div id="live2d-widget"><canvas id="live2d"></canvas></div>
<div id="bubble"></div>
<script src="rig://localhost/live2d/js/live2d.js"></script>
<script src="live2d/js/live2d.js"></script>
<script>
// The character layer, reduced to what the shell drives. The reference's
// message.js owns idle chatter, a talk box and sessionStorage position; none of
@ -45,7 +45,7 @@
// loadlive2d is live2d.js's entry point: canvas id, model.json url.
try {
loadlive2d('live2d', 'rig://localhost/live2d/model/histoire/model.json');
loadlive2d('live2d', 'live2d/model/histoire/model.json');
} catch (e) {
console.error('rig failed to load', e);
}

View file

@ -174,8 +174,25 @@ fn run() -> Result<()> {
/// Read one JSON object per line and hand it to the loop.
fn serve_ipc(path: &std::path::Path, proxy: EventLoopProxy<FromShell>) {
// A crashed host leaves its socket file behind, and a socket file that is
// no longer served makes every later launch fail here and never draw —
// observed on blueline 2026-08-06: the face died, the shell's next join
// died on "Address already in use", and the only fix was `rm`. Bind is the
// moment to learn whether anything is actually listening: an error here
// means the file is a corpse, so unlink it and take the bind once more.
let listener = match std::os::unix::net::UnixListener::bind(path) {
Ok(l) => l,
Err(e) if e.kind() == std::io::ErrorKind::AddrInUse => {
eprintln!("[face] {} is stale; removing and retrying", path.display());
let _ = std::fs::remove_file(path);
match std::os::unix::net::UnixListener::bind(path) {
Ok(l) => l,
Err(e) => {
eprintln!("[face] cannot bind {}: {e}", path.display());
return;
}
}
}
Err(e) => {
eprintln!("[face] cannot bind {}: {e}", path.display());
return;