Remove Generator return value support
parent
381fd4d594
commit
9a13d641fd
|
@ -75,12 +75,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
||||||
$error = null;
|
$error = null;
|
||||||
try {
|
try {
|
||||||
// Invoke the method handler to get a result
|
// Invoke the method handler to get a result
|
||||||
$result = $this->dispatch($msg->body);
|
$result = yield $this->dispatch($msg->body);
|
||||||
if ($result instanceof Generator) {
|
|
||||||
$result = yield from $result;
|
|
||||||
} else if ($result instanceof Promise) {
|
|
||||||
$result = yield $result;
|
|
||||||
}
|
|
||||||
} catch (AdvancedJsonRpc\Error $e) {
|
} catch (AdvancedJsonRpc\Error $e) {
|
||||||
// If a ResponseError is thrown, send it back in the Response
|
// If a ResponseError is thrown, send it back in the Response
|
||||||
$error = $e;
|
$error = $e;
|
||||||
|
|
Loading…
Reference in New Issue