Non-blocking adapter read() wasn't tracking amount read properly which could cause an infinite loop when underlying (infinite) source returns amounts smaller than requested. Also amounts read previously were overwritten by subsequent calls.