Fix destroying the loop and properly close handles.
Sadly this exposes the fact that libuv doesn't allow multiple handles for a given poll fd. Nor does it raise clear errors until you try to close them in an order different from the inverse of the one they were created in. Doing so simply aborts the process when libuv realises that the watcher it has registered is not the watcher you're closing. This further means that multiple watchers wont' get the right set of events delivered, I think (though most of the tests were passing until I discovered this crash).
Showing
Please register or sign in to comment