@@ -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", .{});