summaryrefslogtreecommitdiff
path: root/src/detached/server.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/detached/server.zig')
-rw-r--r--src/detached/server.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/detached/server.zig b/src/detached/server.zig
index 5c0e1487..b088d833 100644
--- a/src/detached/server.zig
+++ b/src/detached/server.zig
@@ -233,8 +233,8 @@ pub const Session = struct {
return batch.len != 0 or batch.status != null;
}
- pub fn restore(s: *Session, bytes: []const u8) !void {
- const replacement = try dump.restore(s.core, bytes);
+ pub fn restore(s: *Session, bytes: []const u8, from: []const u8) !void {
+ const replacement = try dump.restore(s.core, bytes, from);
s.cancelWorkers();
for (0..s.ptys.len) |pane| s.closePty(@intCast(pane));
s.harvest();
@@ -1183,7 +1183,7 @@ pub fn run(init: std.process.Init, opts: pardes.Options, name: []const u8) !void
break :restore;
};
defer gpa.free(bytes);
- session.restore(bytes) catch |err| session.core.reportError(session.core.active, "Restore", err);
+ session.restore(bytes, path) catch |err| session.core.reportError(session.core.active, "Restore", err);
}
}
}
@@ -1223,7 +1223,7 @@ test "detached queued results preserve current requests and are discarded before
try std.testing.expect(s.pipe_tasks.add(.{ .id = 77, .future = .{ .any_future = null, .result = {} } }));
s.mailbox.post(.{ .pipe = .{ .id = 77, .success = true, .outputs = outputs } });
Session.lspStatus(&s, "old status");
- try s.restore(saved);
+ try s.restore(saved, "test");
try std.testing.expect(s.lsp_task == null);
try std.testing.expectEqual(@as(usize, 0), s.pipe_tasks.len);
try std.testing.expect(!s.drainCompletions(true));