Avoid using extra CPU on recv thread

If the nonblocking call returns 0, usleep(1000)

Fixes #187