First of all I would like to say that this is another problem than this one: Similar but not the same
My code looks like this:
struct addrinfo hints,
I don't know where in the man pages you see that it should time out.
If there is no firewall dropping the packets, the connection will be refused pretty fast (one packet from your host, one packet reply). So an "event" on the connecting socket will come in as soon as the reset is received. This will wake up select, with (at least) one active socket.
The first attempt to read from or write to that socket will return the underlying connect error.