Fixed.
authorueno <ueno>
Sun, 14 Dec 2003 03:55:45 +0000 (03:55 +0000)
committerueno <ueno>
Sun, 14 Dec 2003 03:55:45 +0000 (03:55 +0000)
lisp/riece-async.el

index 0a1b371..c39ccbe 100644 (file)
@@ -61,14 +61,14 @@ trap('TSTP', 'IGNORE')
 wfds_in = []
 buf = ''
 loop do
-  rfds, wfds = select([socket, $stdin], wfds_in)
-  if wfds.delete($stdout)
+  rfds, wfds, = select([socket, $stdin], wfds_in)
+  unless wfds.empty?
     begin
       until buf.empty?
         len = $stdout.syswrite(buf)
         buf.slice!(0 .. len)
       end
-      wfds_in.delete($stdout)
+      wfds_in = []
     rescue Errno::EAGAIN
     end
   end