diff --git a/src/executor_asio.cpp b/src/executor_asio.cpp index 8c084a4..4cdbc7c 100644 --- a/src/executor_asio.cpp +++ b/src/executor_asio.cpp @@ -622,8 +622,6 @@ struct watcher_impl { : ctx{strand.ref->ctx}, strand_{strand.ref->strand_}, fd_{*ctx->asio, fd} {} - ~watcher_impl() { fd_.release(); } - void wait_read(watcher::handler h) { if (!read_in_progress_) { read_in_progress_ = true; diff --git a/src/thespian.zig b/src/thespian.zig index 5a5c80f..136937d 100644 --- a/src/thespian.zig +++ b/src/thespian.zig @@ -756,7 +756,7 @@ pub const file_descriptor = struct { const Self = @This(); pub fn init(tag_: []const u8, fd: i32) !Self { - return .{ .handle = c.thespian_file_descriptor_create(tag_.ptr, fd) orelse return error.ThespianFileDescriptorInitFailed }; + return .{ .handle = c.thespian_file_descriptor_create(tag_.ptr, fd) orelse return log_last_error(error.ThespianFileDescriptorInitFailed) }; } pub fn wait_write(self: *const Self) !void {