srctree

Gregory Mullen parent a0366ef6 442927d7
lower some debug logging

src/Client.zig added: 6, removed: 6, total 0
@@ -56,7 +56,7 @@ pub fn connect(c: *Client) !bool {
};
switch (pkt) {
.connack => {
log.err("connack {any}", .{pkt});
log.info("connack {any}", .{pkt});
// handle connack, and record settings
return true;
},
@@ -78,7 +78,7 @@ pub fn send(c: *Client, packet: anytype) !void {
pub fn heartbeat(c: *Client) !void {
const beat_delay: u16 = @truncate(@as(usize, c.heartbeat_interval) * 90 / 100);
if (std.time.timestamp() > c.last_tx + beat_delay) {
log.err("sending heartbeat", .{});
log.debug("sending heartbeat", .{});
try c.send(Ping.Req{});
}
}
@@ -108,7 +108,7 @@ pub fn recv(c: *Client) !?Packet.Parsed {
const reported = try codec.readVarInt(&r);
ready = fifo.readableLength();
while (ready < reported) {
log.err(" getting more data... {}/{}", .{ ready, reported });
log.warn(" getting more data... {}/{}", .{ ready, reported });
poll_more = try c.poller.poll();
if (!poll_more) {
log.err("Unable to keep polling, and not enough data received", .{});
 
src/Publish.zig added: 6, removed: 6, total 0
@@ -161,7 +161,7 @@ pub fn parse(publ: []const u8, flags: Packet.ControlType.Flags) !Publish {
switch (flags.qos) {
.at_most_once => {},
.at_least_once => {
log.err(" expecting {s}", .{"PUBACK"});
log.debug(" expecting {s}", .{"PUBACK"});
ack_required = true;
pktid = try r.readInt(u16, .big);
},