Changed recv to read so it will work with logs.