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
..
2019-02-05 22:38:45 +01:00
2018-11-19 16:33:49 +01:00
2018-11-19 16:33:49 +01:00
2019-12-23 14:20:09 +01:00
2019-02-05 22:38:45 +01:00
2018-11-19 16:33:49 +01:00
2018-10-31 17:54:59 +01:00
2019-02-05 22:38:45 +01:00
2018-11-19 16:33:49 +01:00
2018-11-19 16:33:49 +01:00
2018-11-19 16:33:49 +01:00