diff options
author | Max Kellermann <max@musicpd.org> | 2020-04-23 16:48:10 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-04-23 16:58:26 +0200 |
commit | 8ed533acf3e9afad102d30c8978e200ccab314e5 (patch) | |
tree | c4ab0f084f753f5f2d161d79c9a95941a5a4806a /src/lib | |
parent | a27580d0ccf106c08b3dd52b00d630c674605c59 (diff) |
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
Diffstat (limited to 'src/lib')
0 files changed, 0 insertions, 0 deletions