mirror of
https://git.robbyzambito.me/zaprus/
synced 2026-02-04 19:54:49 +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) {
|
if (flags.connect != null) {
|
||||||
reconnect: while (true) {
|
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();
|
defer client.deinit();
|
||||||
log.debug("Starting connection", .{});
|
log.debug("Starting connection", .{});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user