where thread termination may cause data loss. (fhandler_base::read): Always return at end of function. Just set len to copied_chars when len is zero. Return immediately after raw_read if len <= 0. Remove in_len setting and just check end instead. Fix CRLF handling at end of buffer.