From fc0bae0c85dc5709e7147fc85ece5ab6995b3a19 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 14 Dec 2003 04:12:37 +0000 Subject: [PATCH] Fixed. --- lisp/riece-async.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) -- 1.7.10.4