From 0f48b62eb973955406f599191d9ba358a0e61654 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Tue, 25 May 2021 15:00:53 -0600 Subject: [PATCH] Fix tlsclient (#30) * fix npe in handshake * fix tls client --- examples/tlsclient.nim | 2 +- ws/ws.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tlsclient.nim b/examples/tlsclient.nim index 345d889..c80258b 100644 --- a/examples/tlsclient.nim +++ b/examples/tlsclient.nim @@ -3,7 +3,7 @@ import pkg/[chronos, chronicles, stew/byteutils] -import ../ws/ws +import ../ws/ws, ../ws/errors proc main() {.async.} = let ws = await WebSocket.tlsConnect( diff --git a/ws/ws.nim b/ws/ws.nim index f36a18b..988d697 100644 --- a/ws/ws.nim +++ b/ws/ws.nim @@ -549,7 +549,7 @@ proc initiateHandshake( except CatchableError as exc: raise newException( TransportError, - "Cannot connect to " & $transp.remoteAddress() & " Error: " & exc.msg) + "Cannot connect to " & $address & " Error: " & exc.msg) let requestHeader = "GET " & uri.path & " HTTP/1.1" & CRLF & $headers