feat: gracefully handle disconnects

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-12-15 06:28:09 -04:00
parent 2bc5bdc310
commit 21565a9726
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ pub fn parse(self: *Self, allocator: Allocator, emu: Emulator) !String {
's' => @panic("TODO: Step"), 's' => @panic("TODO: Step"),
// Optional // Optional
'D' => {
log.info("Disconneccting...", .{});
return .{ .static = "OK" };
},
'H' => { 'H' => {
log.warn("{s}", .{self.contents}); log.warn("{s}", .{self.contents});