Fixing up buffer check to ensure partial buffer filling results in the socket not expecting any more input