public function unlisten(): Promise
    {
        if (!$this->unlisten) {
            throw new \Error("Already unlistened on this channel");
        }

        /** @var Promise $promise */
        $promise = ($this->unlisten)($this->channel);
        $this->unlisten = null;

        return $promise;
    }
public function unlisten(): Promise
    {
        if (!$this->unlisten) {
            throw new \Error("Already unlistened on this channel");
        }

        /** @var Promise $promise */
        $promise = ($this->unlisten)($this->channel);
        $this->unlisten = null;

        return $promise;
    }
public function unlisten ( ) : Promise { if ( ! $ this -> unlisten ) { throw new \ Error ( "Already unlistened on this channel" ) ; } /** @var Promise $promise */ $ promise = ( $ this -> unlisten ) ( $ this -> channel ) ; $ this -> unlisten = null ; return $ promise ; }
Unlistens from the channel. No more values will be emitted from this listener.

@return Promise<\Amp\Sql\CommandResult>

@throws \Error If this method was previously invoked.
Unlistens from the channel . No more values will be emitted from this listener .