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