Remove nbRead(). Calls to available() now trigger a call of fill(false) (i.e. non-blocking). This avoids a problem observed on the users list where repeated calls to available() in turn triggered calls to nbRead() that resulted in the buffer being expanded as nbRead() didn't reset pos and lastValid when adding data to what was essentially an empty buffer.
|