more tolerant on socket recv