input/curl: unregister removed sockets from epoll

Fixes a crash bug.  See code comment.
This commit is contained in:
Max Kellermann 2013-11-07 01:09:53 +01:00
parent f8f95e2dbd
commit 899c2bb9cc

View File

@ -192,7 +192,15 @@ public:
:SocketMonitor(_fd, _loop), multi(_multi) {}
~CurlSocket() {
Abandon();
/* TODO: sometimes, CURL uses CURL_POLL_REMOVE after
closing the socket, and sometimes, it uses
CURL_POLL_REMOVE just to move the (still open)
connection to the pool; in the first case,
Abandon() would be most appropriate, but it breaks
the second case - is that a CURL bug? is there a
better solution? */
Steal();
}
/**