Skip to content

Commit

Permalink
Add specific disconnect exception for all raises
Browse files Browse the repository at this point in the history
  • Loading branch information
grepsedawk committed Jul 21, 2023
1 parent ffb6168 commit c2528fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rosegold/packets/connection.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit c2528fd

Please sign in to comment.