diff options
Diffstat (limited to 'runtime/session.zig')
| -rw-r--r-- | runtime/session.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/session.zig b/runtime/session.zig index 9c8446e3..60644aa6 100644 --- a/runtime/session.zig +++ b/runtime/session.zig @@ -101,10 +101,13 @@ pub fn Loop(comptime Frontend: type) type { l.host = try fe.open(&l); defer fe.close(&l); - daemon.notesTo(&l, note); defer l.peers.deinit(); // Before the core goes: each client sees its link end. defer l.peers.dropAll(l.core); + // The daemon's notes, to the loop until its state goes (the + // reader runs on until main's `daemon.quit`). + daemon.notesTo(.{ .ctx = &l, .deliver = note }); + defer daemon.notesTo(null); // A first client on the socket it was started with, before its // first effects: it has every terminal from its first byte, and // no reload (Core.openView). @@ -129,9 +132,8 @@ pub fn Loop(comptime Frontend: type) type { l.peers.boundary(l.core); // A pair's session with no daemon ends with its last link: // nothing could attach to it again; with one, when its last - // client closed its window (a close, not a loss), no Detach - // typed in any. - if (o.pair != null and l.peers.count() == 0 and (daemon.link < 0 or l.peers.closed)) break; + // client left with a close (not a loss) and it is not kept. + if (l.peers.count() == 0 and (l.peers.closed or (o.pair != null and daemon.link < 0))) break; fe.sent(); upgrade.locate(); // Asked in the step (the word), done between steps: the |
