diff options
author | Araq <rumpf_a@web.de> | 2014-04-20 01:19:10 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-04-20 01:19:10 +0200 |
commit | 05e89ffceb4a0cb85b59eb1ca34d27b0d5cb63dd (patch) | |
tree | 2f0604f731a07ce17b3f6af06b268d67095d4259 /lib/pure/irc.nim | |
parent | 9a2704056a03fb39c2b4a212cf9b15ae6b411544 (diff) | |
parent | 1f9f34b9a747b313a85c1e9a15e3a0fdb5f2255a (diff) | |
download | Nim-05e89ffceb4a0cb85b59eb1ca34d27b0d5cb63dd.tar.gz |
Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
Diffstat (limited to 'lib/pure/irc.nim')
-rw-r--r-- | lib/pure/irc.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/irc.nim b/lib/pure/irc.nim index 83fb231f6..31a673210 100644 --- a/lib/pure/irc.nim +++ b/lib/pure/irc.nim @@ -249,6 +249,7 @@ proc reconnect*(irc: PIRC, timeout = 5000) = if secSinceReconnect < timeout: sleep(timeout - secSinceReconnect) irc.sock = socket() + if irc.sock == InvalidSocket: osError(osLastError()) irc.connect() irc.lastReconnect = epochTime() @@ -274,6 +275,7 @@ proc irc*(address: string, port: TPort = 6667.TPort, result.messageBuffer = @[] result.status = SockIdle result.sock = socket() + if result.sock == InvalidSocket: osError(osLastError()) proc processLine(irc: PIRC, line: string): TIRCEvent = if line.len == 0: |