mirror of
https://git.robbyzambito.me/zaprus
synced 2026-02-05 00:44:51 +00:00
Keep retrying if there is no interface
This commit is contained in:
@@ -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", .{});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user