event/ServerSocket: allow mixing AddFD() with other Add*() methods

This commit is contained in:
Max Kellermann 2018-10-30 20:36:42 +01:00
parent dd8e14e121
commit 64da9399ca
1 changed files with 5 additions and 0 deletions

View File

@ -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);