From: ueno Date: Sun, 14 Dec 2003 04:12:37 +0000 (+0000) Subject: Fixed. X-Git-Tag: riece-0_1_7~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=fc0bae0c85dc5709e7147fc85ece5ab6995b3a19;p=elisp%2Friece.git Fixed. --- diff --git a/lisp/riece-async.el b/lisp/riece-async.el index 30eb658..4edf500 100644 --- a/lisp/riece-async.el +++ b/lisp/riece-async.el @@ -62,6 +62,11 @@ loop do rfds, wfds, = select([socket, $stdin], wfds_in) unless wfds.empty? begin + until buf.length <= " max-buffer-size " + i = buf.index(\"\r\n\") + break unless i + buf.slice!(0 .. i + 1) + end until buf.empty? len = $stdout.syswrite(buf) buf.slice!(0 .. len) @@ -79,9 +84,6 @@ loop do else wfds_in = [$stdout] buf << line - until buf.length <= " max-buffer-size " - buf.slice!(0 .. buf.index(\"\r\n\")) - end end end if rfds.include?($stdin)