Skip flush() when buffer is empty.