mpd/src/event
Max Kellermann 8ed533acf3 event/SocketMonitor: handle epoll_ctl()=EBADF/ENOENT in Schedule()
This fixes a freeze bug in the NFS input/storage plugins: when libnfs
auto-reconnets after a failure, it installs the new socket on the same
file descriptor number.  MPD's attempt to unregister the old socket by
calling SocketMonitor::Steal() from NfsConnection::ScheduleSocket()
fails because the new/old socket number is not registered in epoll, so
epoll_ctl() returns ENOENT.  The problem is that it left
`scheduled_flags`, and so subsequent Schedule() calls will use
`EPOLL_CTL_MOD`, which will fail again and again.  Instead, we need to
use `EPOLL_CTL_ADD` to register the new socket.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/806

Closes https://github.com/MusicPlayerDaemon/MPD/issues/756
2020-04-23 16:58:26 +02:00
..
BufferedSocket.cxx event/SocketMonitor: don't cancel if OnSocketReady() returns false 2019-04-04 10:24:58 +02:00
BufferedSocket.hxx event/{Fully,}BufferedSocket: add more API documentation 2019-04-04 10:24:58 +02:00
Call.cxx event/Loop: add flag alive 2019-02-05 22:38:45 +01:00
Call.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
DeferEvent.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
DeferEvent.hxx event/*, ...: make GetEventLoop() const 2020-03-26 17:19:13 +01:00
FullyBufferedSocket.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
FullyBufferedSocket.hxx event/{Fully,}BufferedSocket: add more API documentation 2019-04-04 10:24:58 +02:00
IdleMonitor.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
IdleMonitor.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
Loop.cxx event/Loop: remove bogus assertion 2019-12-23 14:20:09 +01:00
Loop.hxx event/Loop: add flag alive 2019-02-05 22:38:45 +01:00
MaskMonitor.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
MaskMonitor.hxx event/*, ...: make GetEventLoop() const 2020-03-26 17:19:13 +01:00
meson.build src/event/meson.build: depend in libnet.a 2020-04-02 17:16:05 +02:00
MultiSocketMonitor.cxx event/MultiSocketMonitor: add workaround for /dev/null 2019-12-22 12:08:44 +01:00
MultiSocketMonitor.hxx event/MultiSocketMonitor: add workaround for /dev/null 2019-12-22 12:08:44 +01:00
PollGroup.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PollGroupEpoll.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PollGroupPoll.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
PollGroupPoll.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PollGroupWinSelect.cxx event/PollGroupWinSelect: make EVENT_{READ,WRITE} static 2020-04-23 15:10:57 +02:00
PollGroupWinSelect.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PollResultGeneric.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
ServerSocket.cxx event/ServerSocket: runtime error if abstract sockets are unavailable 2019-03-20 13:09:16 +01:00
ServerSocket.hxx event/ServerSocket: runtime error if abstract sockets are unavailable 2019-03-20 13:09:16 +01:00
SignalMonitor.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
SignalMonitor.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
SocketMonitor.cxx event/SocketMonitor: handle epoll_ctl()=EBADF/ENOENT in Schedule() 2020-04-23 16:58:26 +02:00
SocketMonitor.hxx event/SocketMonitor: remove HANGUP|ERROR from ScheduleRead() 2020-04-23 15:18:18 +02:00
Thread.cxx event/Loop: add flag alive 2019-02-05 22:38:45 +01:00
Thread.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TimerEvent.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TimerEvent.hxx event/*, ...: make GetEventLoop() const 2020-03-26 17:19:13 +01:00
WakeFD.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00