Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Jan 27, 2025
1 parent 4b5d68d commit 36cccaf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hyperx/server.nim
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ proc workerImpl(ctx: WorkerContext, ssl: static[bool] = true) =
finally:
destroyServerSslContext()

proc workerSsl(ctx: ptr WorkerContext) {.thread.} =
proc workerSsl(ctx: ptr WorkerContext) {.thread, definedSsl.} =
workerImpl(ctx[], ssl = true)

proc worker(ctx: ptr WorkerContext) {.thread.} =
Expand All @@ -243,6 +243,8 @@ proc run*(
threads = 1,
ssl: static[bool] = true
) =
when ssl and not isSslDefined:
{.error: "this lib needs -d:ssl".}
let ctx = WorkerContext(
hostname: hostname,
port: port,
Expand Down

0 comments on commit 36cccaf

Please sign in to comment.