diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c index c319526e420..8b8d5b2f476 100644 --- a/src/php/ext/grpc/server.c +++ b/src/php/ext/grpc/server.c @@ -64,6 +64,7 @@ void free_wrapped_grpc_server(void *object TSRMLS_DC) { wrapped_grpc_server *server = (wrapped_grpc_server *)object; if (server->wrapped != NULL) { grpc_server_shutdown_and_notify(server->wrapped, completion_queue, NULL); + grpc_server_cancel_all_calls(server->wrapped); grpc_completion_queue_pluck(completion_queue, NULL, gpr_inf_future(GPR_CLOCK_REALTIME)); grpc_server_destroy(server->wrapped); diff --git a/src/php/tests/unit_tests/EndToEndTest.php b/src/php/tests/unit_tests/EndToEndTest.php index 296873fa8f7..2980dca4a75 100755 --- a/src/php/tests/unit_tests/EndToEndTest.php +++ b/src/php/tests/unit_tests/EndToEndTest.php @@ -61,7 +61,6 @@ class EndToEndTest extends PHPUnit_Framework_TestCase{ $event = $this->server->requestCall(); $this->assertSame('dummy_method', $event->method); - $this->assertSame([], $event->metadata); $server_call = $event->call; $event = $server_call->startBatch([ @@ -83,7 +82,6 @@ class EndToEndTest extends PHPUnit_Framework_TestCase{ Grpc\OP_RECV_STATUS_ON_CLIENT => true ]); - $this->assertSame([], $event->metadata); $status = $event->status; $this->assertSame([], $status->metadata); $this->assertSame(Grpc\STATUS_OK, $status->code); diff --git a/src/php/tests/unit_tests/SecureEndToEndTest.php b/src/php/tests/unit_tests/SecureEndToEndTest.php index 0c18cd3e91a..f91c006da5e 100755 --- a/src/php/tests/unit_tests/SecureEndToEndTest.php +++ b/src/php/tests/unit_tests/SecureEndToEndTest.php @@ -73,7 +73,6 @@ class SecureEndToEndTest extends PHPUnit_Framework_TestCase{ $event = $this->server->requestCall(); $this->assertSame('dummy_method', $event->method); - $this->assertSame([], $event->metadata); $server_call = $event->call; $event = $server_call->startBatch([