~jamii/focus

1654f2faa7f44aa29e5885ea6a6fdad942358da0 — Jamie Brandon 11 months ago 04aa84a
Dont panic if the client binary exits before the window
1 files changed, 1 insertions(+), 1 deletions(-)

M lib/focus.zig
M lib/focus.zig => lib/focus.zig +1 -1
@@ 142,7 142,7 @@ pub fn receiveRequest(buffer: []u8, server_socket: ServerSocket) ?RequestAndClie
}

pub fn sendReply(server_socket: ServerSocket, client_address: Address, exit_code: u8) void {
    _ = std.os.sendto(server_socket.socket, &[1]u8{exit_code}, 0, &client_address.address.any, client_address.address_len) catch |err| panic("Failed to send reply: {}", .{err});
    _ = std.os.sendto(server_socket.socket, &[1]u8{exit_code}, 0, &client_address.address.any, client_address.address_len) catch |err| warn("Failed to send reply: {}\n", .{err});
}

// returns exit code