Skip to content

Commit

Permalink
sockets: drop cps bug workaround
Browse files Browse the repository at this point in the history
It is now fixed
  • Loading branch information
alaviss committed Feb 14, 2024
1 parent 82b3a56 commit dd87420
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/sys/sockets.nim
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,9 @@ proc connectTcpAsync*(endpoint: IPEndpoint): AsyncConn[TCP]
## `OSError` is raised if the connection fails.
case endpoint.kind
of V4:
# XXX: https://github.com/nim-works/cps/issues/301
let v4 = endpoint.v4
connectTcpAsync(v4)
connectTcpAsync(endpoint.v4)
of V6:
# XXX: https://github.com/nim-works/cps/issues/301
let v6 = endpoint.v6
connectTcpAsync(v6)
connectTcpAsync(endpoint.v6)

proc connectTcpAsync*(endpoints: ResolverResult): AsyncConn[TCP]
{.asyncio.} =
Expand Down Expand Up @@ -766,13 +762,9 @@ proc listenTcpAsync*(endpoint: IPEndpoint, backlog: Option[Natural] = none(Natur
## If `backlog` is `0`, the OS will select a reasonable minimum.
case endpoint.kind
of V4:
# XXX: https://github.com/nim-works/cps/issues/301
let v4 = endpoint.v4
listenTcpAsync(v4)
listenTcpAsync(endpoint.v4)
of V6:
# XXX: https://github.com/nim-works/cps/issues/301
let v6 = endpoint.v6
listenTcpAsync(v6)
listenTcpAsync(endpoint.v6)

proc listenTcpAsync*(endpoints: ResolverResult, backlog: Option[Natural] = none(Natural)): AsyncListener[TCP]
{.asyncio.} =
Expand Down

0 comments on commit dd87420

Please sign in to comment.