From c2528fd4ccf18a9ce2e457e8601a23bf2e7f9f24 Mon Sep 17 00:00:00 2001 From: Alex Piechowski Date: Thu, 20 Jul 2023 23:00:09 -0500 Subject: [PATCH] Add specific disconnect exception for all raises --- src/rosegold/packets/connection.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rosegold/packets/connection.cr b/src/rosegold/packets/connection.cr index 9fdb0a89..93fe45f0 100644 --- a/src/rosegold/packets/connection.cr +++ b/src/rosegold/packets/connection.cr @@ -112,7 +112,7 @@ class Rosegold::Connection(InboundPacket, OutboundPacket) end def send_packet(packet_bytes : Bytes) - raise "Disconnected: #{close_reason}" if close_reason + raise Rosegold::Client::NotConnected.new if close_reason if compress? Minecraft::IO::Memory.new.tap do |buffer|