event/ServerSocket: allow mixing AddFD() with other Add*() methods
This commit is contained in:
parent
dd8e14e121
commit
64da9399ca
|
@ -207,6 +207,11 @@ ServerSocket::Open()
|
||||||
assert(i.GetSerial() > 0);
|
assert(i.GetSerial() > 0);
|
||||||
assert(good == nullptr || i.GetSerial() >= good->GetSerial());
|
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()) {
|
if (bad != nullptr && i.GetSerial() != bad->GetSerial()) {
|
||||||
Close();
|
Close();
|
||||||
std::rethrow_exception(last_error);
|
std::rethrow_exception(last_error);
|
||||||
|
|
Loading…
Reference in New Issue