fixed read / recv different return codes