Add checks for invalid socket when creating sockets.
This commit is contained in:
parent
817337af30
commit
21d0cc8cdf
7 changed files with 9 additions and 0 deletions
|
|
@ -288,6 +288,7 @@ proc request*(url: string, httpMethod = httpGET, extraHeaders = "",
|
|||
add(headers, "\c\L")
|
||||
|
||||
var s = socket()
|
||||
if s == InvalidSocket: osError(osLastError())
|
||||
var port = sockets.TPort(80)
|
||||
if r.scheme == "https":
|
||||
when defined(ssl):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue