Set nonblock after calling connect, else it returns immediately