public function attach($conn, $inf = null) { parent::attach($conn, $inf); if ($this->maxConcurrency && !$this->overload) { if ($this->count() >= $this->maxConcurrency) { $this->overload = true; $this->disable(); return; } } }