Skip to content

Commit

Permalink
fix Error: expected argument #1 to 'Socket::Family.new' to be UInt8, …
Browse files Browse the repository at this point in the history
…not Int16
  • Loading branch information
mamantoha committed Sep 17, 2024
1 parent 27fd06f commit b8318e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ext/socket/address.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Socket
struct IPAddress
def self.from(sockaddr : LibC::SockaddrIn*, addrlen) : IPAddress
case family = Family.new(sockaddr.value.sin_family)
case family = Family.new(sockaddr.value.sin_family.to_u8)
when Family::INET6
new(sockaddr.as(LibC::SockaddrIn6*), addrlen.to_i)
when Family::INET
Expand Down

0 comments on commit b8318e4

Please sign in to comment.