public function watchConnectivityState($last_state, $deadline_obj = null)
    {
        if ($deadline_obj == null || !is_a($deadline_obj, '\Grpc\Timeval')) {
            throw new \InvalidArgumentException("");
        }
        // Since getRealChannel is creating a PHP Channel object. However in gRPC, when a Channel
        // object is closed, we only mark this Object to be invalid. Thus, we need a global variable
        // to mark whether this GCPExtensionChannel is close or not.
        if ($this->is_closed) {
            throw new \RuntimeException("Channel has already been closed");
        }
        $state = 0;
        foreach ($this->channel_refs as $channel_ref) {
            $state = $channel_ref->getRealChannel($this->credentials)->watchConnectivityState($last_state, $deadline_obj);
        }
        return $state;
    }