aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/CurlInputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-07 01:09:53 +0100
committerMax Kellermann <max@duempel.org>2013-11-07 01:10:07 +0100
commit899c2bb9cc618e887709f933147960297924cb46 (patch)
tree0df9a16d21d2614c63a0bb13bd786f55b6cc44ed /src/input/CurlInputPlugin.cxx
parentf8f95e2dbd73d0d43211136e50a8d640f145872c (diff)
downloadmpd-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.cxx10
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();
}
/**