1
0
mirror of https://github.com/danog/amp.git synced 2025-01-22 05:11:42 +01:00

Remove leftover exception class

No longer needed as Subscriber is not an awaitable.
This commit is contained in:
Aaron Piotrowski 2016-07-19 13:30:28 -05:00
parent 70123b9a44
commit bec838b693
2 changed files with 2 additions and 10 deletions

View File

@ -6,8 +6,6 @@ use Amp\Coroutine;
use Amp\Future;
use Amp\Observable;
use Amp\Subscriber;
use Amp\Success;
use Amp\UnsubscribedException;
use Interop\Async\Awaitable;
use Interop\Async\Loop;
@ -63,7 +61,7 @@ trait Producer {
* @return \Amp\Subscriber
*/
public function subscribe(callable $onNext) {
if ($this->result !== null) {
if ($this->resolved) {
return new Subscriber(
$this->nextId++,
$this->unsubscribe
@ -84,9 +82,8 @@ trait Producer {
/**
* @param string $id
* @param \Throwable|\Exception|null $exception
*/
private function unsubscribe($id, $exception = null) {
private function unsubscribe($id) {
if (!isset($this->subscribers[$id])) {
return;
}

View File

@ -1,5 +0,0 @@
<?php
namespace Amp;
class UnsubscribedException extends \RuntimeException {}