2014-07-21 11:21 GMT+02:00 Saúl Ibarra Corretgé <[email protected]>:
>> Well, it returns UV_EBUSY, so I understand I don't need to do
>> nothing to free any loop resources, right?
>>
>
> If uv_loop_close returns UV_EBUSY it means you cannot free the
> resources because the loop is in use. If you fail to bind the udp
> handle you need to uv_close it, run the loop so the close callbacks
> are run, and then close the loop.


Yes... realizing right now. It is somehow strange:

Remember I don't call uv_run. But I need to call uv_close on the UDP
socket (otherwise it does bind the socket!). And if later I call
uv_close then the socket is closed, but of course the close_cb is not
called :)

Question: Is it safe to do this?


- bind UDP (sucess)
- uv_close
- uv_run
- uv_close_loop

-- 
Iñaki Baz Castillo
<[email protected]>

-- 
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.

Reply via email to