Use select on the non-blocking socket