From 21d0cc8cdf432b0eaf0bd6ea16d00070ab9dab89 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Tue, 15 Apr 2014 13:51:25 +0100 Subject: Add checks for invalid socket when creating sockets. --- compiler/service.nim | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/service.nim') diff --git a/compiler/service.nim b/compiler/service.nim index 42c4aa9f4..2b861e1c7 100644 --- a/compiler/service.nim +++ b/compiler/service.nim @@ -84,6 +84,7 @@ proc serve*(action: proc (){.nimcall.}) = of "tcp", "": when useCaas: var server = socket() + if server == invalidSocket: osError(osLastError()) let p = getConfigVar("server.port") let port = if p.len > 0: parseInt(p).TPort else: 6000.TPort server.bindAddr(port, getConfigVar("server.address")) -- cgit 1.4.1-2-gfad0