Yeah -- in general you can't really trust .available() for breaking out of a read loop ... It's very possible that you have an active connection that just doesn't have anything in the queue yet ... Note that this class is used on all connection types -- serial, usb, and ethernet, all of have pretty different performance characteristics (I would guess ethernet especially would be guilty of failing this test).