rotctl: actually quit when receiving the quit message
This commit is contained in:
parent
6bd401d9c8
commit
38a286da11
@ -33,7 +33,7 @@ pub fn run(allocator: std.mem.Allocator) !void {
|
||||
.rotator = try YaesuController.init(allocator),
|
||||
};
|
||||
|
||||
while (true) {
|
||||
while (interface.running) {
|
||||
const client = try server.accept();
|
||||
defer {
|
||||
log.info("disconnecting client", .{});
|
||||
@ -42,8 +42,6 @@ pub fn run(allocator: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
interface.writer = .{ .unbuffered_writer = client.stream.writer() };
|
||||
interface.running = true;
|
||||
defer interface.running = false;
|
||||
|
||||
log.info("client connected from {}", .{client.address});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user