- rfds, wfds = select([socket, $stdin], wfds_in)
- if wfds.delete($stdout)
+ rfds, wfds, = select([socket, $stdin], wfds_in)
+ unless wfds.empty?
+ until buf.length <= " max-buffer-size "
+ i = buf.index(\"\\r\\n\")
+ break unless i
+ buf.slice!(0 .. i + 1)
+ end