1
0
Fork 0

Remove Generator return value support

pull/136/head
Felix Becker 2016-11-06 15:22:32 +01:00
parent 381fd4d594
commit 9a13d641fd
1 changed files with 1 additions and 6 deletions

View File

@ -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;