From 21565a97268a1ee8cc50c0e858203c83b5fffd39 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Thu, 15 Dec 2022 06:28:09 -0400 Subject: [PATCH] feat: gracefully handle disconnects --- src/Packet.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Packet.zig b/src/Packet.zig index b3f33fb..39c9056 100644 --- a/src/Packet.zig +++ b/src/Packet.zig @@ -107,6 +107,10 @@ pub fn parse(self: *Self, allocator: Allocator, emu: Emulator) !String { 's' => @panic("TODO: Step"), // Optional + 'D' => { + log.info("Disconneccting...", .{}); + return .{ .static = "OK" }; + }, 'H' => { log.warn("{s}", .{self.contents});