input/Curl: don't remove/add modified GPollFD

Not necessary, GLib will pick up the updated GPollFD automatically.
This commit is contained in:
Max Kellermann 2013-01-15 18:10:27 +01:00
parent 39439b80f5
commit 1c7ee737e6
1 changed files with 2 additions and 9 deletions

View File

@ -325,18 +325,11 @@ curl_update_fds(void)
gushort events = input_curl_fd_events(poll_fd->fd, &rfds,
&wfds, &efds);
if (events != poll_fd->events)
g_source_remove_poll(curl.source, poll_fd);
if (events != 0) {
if (events != poll_fd->events) {
poll_fd->events = events;
g_source_add_poll(curl.source, poll_fd);
}
poll_fd->events = events;
prev = i;
} else {
g_source_remove_poll(curl.source, poll_fd);
curl.fds.erase_after(prev);
}
}