avoid the wrong read from socket by set lenflag