diff options
author | Max Kellermann <max@duempel.org> | 2013-11-07 01:09:53 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-11-07 01:10:07 +0100 |
commit | 899c2bb9cc618e887709f933147960297924cb46 (patch) | |
tree | 0df9a16d21d2614c63a0bb13bd786f55b6cc44ed /src/input/CurlInputPlugin.cxx | |
parent | f8f95e2dbd73d0d43211136e50a8d640f145872c (diff) | |
download | mpd-899c2bb9cc618e887709f933147960297924cb46.tar.gz mpd-899c2bb9cc618e887709f933147960297924cb46.tar.xz mpd-899c2bb9cc618e887709f933147960297924cb46.zip |
input/curl: unregister removed sockets from epoll
Fixes a crash bug. See code comment.
Diffstat (limited to 'src/input/CurlInputPlugin.cxx')
-rw-r--r-- | src/input/CurlInputPlugin.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx index d17937976..841db6ceb 100644 --- a/src/input/CurlInputPlugin.cxx +++ b/src/input/CurlInputPlugin.cxx @@ -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(); } /** |