diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-30 20:36:42 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-30 22:14:53 +0100 |
commit | 64da9399ca1e26c038dcb46ee53c4b5375f5d553 (patch) | |
tree | e40d95447789e21e59ec1c4c9e88e1e1176eaf03 /src/event/ServerSocket.cxx | |
parent | dd8e14e121f1de1642ba10f71c7fb10e68d46c96 (diff) |
event/ServerSocket: allow mixing AddFD() with other Add*() methods
Diffstat (limited to 'src/event/ServerSocket.cxx')
-rw-r--r-- | src/event/ServerSocket.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index cf51cb363..1ba68db9b 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -207,6 +207,11 @@ ServerSocket::Open() assert(i.GetSerial() > 0); assert(good == nullptr || i.GetSerial() >= good->GetSerial()); + if (i.IsDefined()) + /* already open - was probably added by + AddFD() */ + continue; + if (bad != nullptr && i.GetSerial() != bad->GetSerial()) { Close(); std::rethrow_exception(last_error); |