Skip to content

Commit

Permalink
sockets(posix): switch conversion syntax
Browse files Browse the repository at this point in the history
NimSkull doesn't bode well with `.type`, switching to `type()` seems to work
  • Loading branch information
alaviss committed Feb 11, 2024
1 parent fe029d5 commit 9c5d9ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sys/private/sockets_posix.nim
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ template tcpLocalEndpoint() {.dirty.} =
"The length of the endpoint structure is bigger than expected size. This is a nim-sys bug."

case saddr.ss_family
of AF_INET.TSa_Family:
of TSa_Family(AF_INET):
result = IPEndpoint(kind: V4, v4: cast[IP4Endpoint](saddr))
of AF_INET6.TSa_Family:
of TSa_Family(AF_INET6):
result = IPEndpoint(kind: V6, v6: cast[IP6Endpoint](saddr))
else:
doAssert false, "Unexpected remote address family: " & $saddr.ss_family

0 comments on commit 9c5d9ba

Please sign in to comment.