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.
(cherry picked from b5d09d4adb commit)
This commit is contained in:
Rich Coe 2006-11-08 18:10:14 +02:00 committed by Daniel Stone
parent be91a981df
commit 22bccea8dc

View file

@ -1019,7 +1019,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