src/PubSub/AbstractConsumer.php
public function stop($drop = false)
    {
        if (!$this->valid()) {
            return false;
        }

        if ($drop) {
            $this->invalidate();
            $this->disconnect();
        } else {
            if ($this->isFlagSet(self::STATUS_SUBSCRIBED)) {
                $this->unsubscribe();
            }
            if ($this->isFlagSet(self::STATUS_PSUBSCRIBED)) {
                $this->punsubscribe();
            }
        }

        return !$drop;
    }
public function stop($drop = false)
    {
        if (!$this->valid()) {
            return false;
        }

        if ($drop) {
            $this->invalidate();
            $this->disconnect();
        } else {
            if ($this->isFlagSet(self::STATUS_SUBSCRIBED)) {
                $this->unsubscribe();
            }
            if ($this->isFlagSet(self::STATUS_PSUBSCRIBED)) {
                $this->punsubscribe();
            }
        }

        return !$drop;
    }
public function stop ( $ drop = false ) { if ( ! $ this -> valid ( ) ) { return false ; } if ( $ drop ) { $ this -> invalidate ( ) ; $ this -> disconnect ( ) ; } else { if ( $ this -> isFlagSet ( self :: STATUS_SUBSCRIBED ) ) { $ this -> unsubscribe ( ) ; } if ( $ this -> isFlagSet ( self :: STATUS_PSUBSCRIBED ) ) { $ this -> punsubscribe ( ) ; } } return ! $ drop ; }
Closes the context by unsubscribing from all the subscribed channels. The
context can be forcefully closed by dropping the underlying connection.

@param bool $drop Indicates if the context should be closed by dropping the connection.

@return bool Returns false when there are no pending messages.
Closes the context by unsubscribing from all the subscribed channels . The context can be forcefully closed by dropping the underlying connection .