Made recvfrom nonblocking, thread now exits properly