On 11/21/2014 06:01 PM, Rishi wrote:
> If uv_tcp_connect fails for any reason and I want to retry the
> connection. Is it safe for me to just call uv_tcp_connect again inside
> my call back? I want to retry for lets say N times or for some period of
> time.
> 

Replied on IRC, but adding it here for completeness:

Yes you can, but IIRC the socket is in a somewhat inconsistent state, so
you'll be better off by creating a new handle.

Here is some reference:
http://stackoverflow.com/questions/2237489/reusing-socket-descriptor-on-connection-failure


Cheers,

-- 
Saúl Ibarra Corretgé
bettercallsaghul.com


-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to