src/GcpBaseCall.php
protected function _rpcPostProcess($status, $response)
    {
        if ($this->_affinity) {
            $command = $this->_affinity['command'];
            if ($command == self::BIND) {
                if ($status->code != \Grpc\STATUS_OK) {
                    return;
                }
                $affinity_key = $this->getAffinityKeyFromProto($response);
                $this->gcp_channel->bind($this->channel_ref, $affinity_key);
            } elseif ($command == self::UNBIND) {
                $this->gcp_channel->unbind($this->affinity_key);
            }
        }
        $this->channel_ref->activeStreamRefDecr();
    }
protected function _rpcPostProcess($status, $response)
    {
        if ($this->_affinity) {
            $command = $this->_affinity['command'];
            if ($command == self::BIND) {
                if ($status->code != \Grpc\STATUS_OK) {
                    return;
                }
                $affinity_key = $this->getAffinityKeyFromProto($response);
                $this->gcp_channel->bind($this->channel_ref, $affinity_key);
            } elseif ($command == self::UNBIND) {
                $this->gcp_channel->unbind($this->affinity_key);
            }
        }
        $this->channel_ref->activeStreamRefDecr();
    }
protected function _rpcPostProcess ( $ status , $ response ) { if ( $ this -> _affinity ) { $ command = $ this -> _affinity [ 'command' ] ; if ( $ command == self :: BIND ) { if ( $ status -> code != \ Grpc \ STATUS_OK ) { return ; } $ affinity_key = $ this -> getAffinityKeyFromProto ( $ response ) ; $ this -> gcp_channel -> bind ( $ this -> channel_ref , $ affinity_key ) ; } elseif ( $ command == self :: UNBIND ) { $ this -> gcp_channel -> unbind ( $ this -> affinity_key ) ; } } $ this -> channel_ref -> activeStreamRefDecr ( ) ; }
Update ChannelRef when RPC finishes.

@param \stdClass $status The status object, with integer $code, string
$details, and array $metadata members
@param mixed $response Response.
Update ChannelRef when RPC finishes .