Keep retrying if there is no interface

This commit is contained in:
2026-02-04 12:15:28 -05:00
committed by Tangled
parent e744a44317
commit 974baf0274

View File

@@ -146,7 +146,13 @@ pub fn main(init: std.process.Init) !void {
if (flags.connect != null) {
reconnect: while (true) {
client = try .init();
client = SaprusClient.init() catch |err| switch (err) {
error.NoInterfaceFound => {
try init.io.sleep(.fromMilliseconds(100), .boot);
continue :reconnect;
},
else => |e| return e,
};
defer client.deinit();
log.debug("Starting connection", .{});