Modified behaviour of checkBuffer to match new select behaviour. Refs #822.

This commit is contained in:
Dominik Picheta 2014-04-05 23:10:51 +01:00
commit 51c203bab0
2 changed files with 14 additions and 15 deletions

View file

@ -346,6 +346,7 @@ proc poll*(irc: PIRC, ev: var TIRCEvent,
var line = TaintedString""
var socks = @[irc.sock]
var ret = socks.select(timeout)
if ret == -1: osError(osLastError())
if socks.len() != 0 and ret != 0:
irc.sock.readLine(line)
ev = irc.processLine(line.string)