CheckConnections: don't close down the server client (bug #7876)

When an appgroup is shutting down, the list of clients can change, so make
sure we're not trying to shut the server down.
This commit is contained in:
Rich Coe 2006-11-08 18:10:14 +02:00 committed by Daniel Stone
parent 0567a6337b
commit b5d09d4adb

View File

@ -1045,7 +1045,7 @@ CheckConnections(void)
FD_ZERO(&tmask);
FD_SET(curclient, &tmask);
r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
if (r < 0)
if (r < 0 && GetConnectionTranslation(curclient) > 0)
CloseDownClient(clients[GetConnectionTranslation(curclient)]);
}
#endif