public function removeInvalid()
{
$toDel = [];
$const = $this->generateConst();
foreach ($this->connectionPool as $cid => $cdata) {
if (!$this->validateIn($const, $cdata)) {
$toDel[] = $cid;
}
}
foreach ($toDel as $cid) {
unset($this->connectionPool[$cid]);
}
return $toDel;
}