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
|
|
@ -238,6 +238,7 @@ when isMainModule:
|
|||
sock: TSocket
|
||||
|
||||
var sock = socket()
|
||||
if sock == InvalidSocket: osError(osLastError())
|
||||
#sock.setBlocking(false)
|
||||
sock.connect("irc.freenode.net", TPort(6667))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue