fix: log before stopping watch thread on handler error
This commit is contained in:
parent
1574e4b446
commit
2e1f469e3e
3 changed files with 36 additions and 9 deletions
|
|
@ -121,7 +121,10 @@ pub fn Create(comptime variant: InterfaceType) type {
|
|||
_ = std.posix.poll(&pfds, -1) catch return;
|
||||
if (pfds[1].revents & std.posix.POLL.IN != 0) return; // stop signal
|
||||
if (pfds[0].revents & std.posix.POLL.IN != 0) {
|
||||
self.handle_read_ready(allocator) catch return;
|
||||
self.handle_read_ready(allocator) catch |e| {
|
||||
std.log.err("nightwatch: handler returned {s}, stopping watch thread", .{@errorName(e)});
|
||||
return;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue