mirror of
https://github.com/logos-storage/nim-websock.git
synced 2026-01-05 23:23:10 +00:00
Fix remaining GCUnsafe2 warnings
Removes last use of globals in async tests.
This commit is contained in:
parent
80f62e8fdd
commit
6f3d5cdb2d
@ -19,10 +19,6 @@ import pkg/[
|
|||||||
import ../websock/websock
|
import ../websock/websock
|
||||||
import ./keys
|
import ./keys
|
||||||
|
|
||||||
let
|
|
||||||
WSSecureKey* = TLSPrivateKey.init(SecureKey)
|
|
||||||
WSSecureCert* = TLSCertificate.init(SecureCert)
|
|
||||||
|
|
||||||
const WSPath* = when defined secure: "/wss" else: "/ws"
|
const WSPath* = when defined secure: "/wss" else: "/ws"
|
||||||
|
|
||||||
proc rndStr*(size: int): string =
|
proc rndStr*(size: int): string =
|
||||||
@ -42,8 +38,8 @@ proc waitForClose*(ws: WSSession) {.async.} =
|
|||||||
|
|
||||||
proc createServer*(
|
proc createServer*(
|
||||||
address = initTAddress("127.0.0.1:8888"),
|
address = initTAddress("127.0.0.1:8888"),
|
||||||
tlsPrivateKey = WSSecureKey,
|
tlsPrivateKey = TLSPrivateKey.init(SecureKey),
|
||||||
tlsCertificate = WSSecureCert,
|
tlsCertificate = TLSCertificate.init(SecureCert),
|
||||||
handler: HttpAsyncCallback = nil,
|
handler: HttpAsyncCallback = nil,
|
||||||
flags: set[ServerFlags] = {ServerFlags.TcpNoDelay, ServerFlags.ReuseAddr},
|
flags: set[ServerFlags] = {ServerFlags.TcpNoDelay, ServerFlags.ReuseAddr},
|
||||||
tlsFlags: set[TLSFlags] = {},
|
tlsFlags: set[TLSFlags] = {},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user