Skip to content

Commit

Permalink
Fix usage of Errno for Crystal 0.34.0
Browse files Browse the repository at this point in the history
Errno exception type has been replaced in 0.34.0 by more specific types
  • Loading branch information
straight-shoota authored and will committed Apr 6, 2020
1 parent cafec2c commit 8297465
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pq/connection.cr
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ module PQ
break if @soc.closed?
begin
handle_async_frames(read_one_frame(soc.read_char))
rescue e : Errno
e.errno == Errno::EBADF && @soc.closed? ? break : raise e
rescue e : Socket::Error
e.os_error.try(&.ebadf?) && @soc.closed? ? break : raise e
end
end
end
Expand Down

0 comments on commit 8297465

Please sign in to comment.