| Index: services/dart/test/pingpong_target/main.dart
|
| diff --git a/services/dart/test/pingpong_target/main.dart b/services/dart/test/pingpong_target/main.dart
|
| index 5500322d69dab55ef456eeb011f1a7f801a38c12..15a6b19667466cb0e5a46f8936605e4022be208e 100644
|
| --- a/services/dart/test/pingpong_target/main.dart
|
| +++ b/services/dart/test/pingpong_target/main.dart
|
| @@ -16,9 +16,8 @@ class PingPongServiceImpl implements PingPongService {
|
|
|
| PingPongServiceImpl(Application application, MojoMessagePipeEndpoint endpoint)
|
| : _application = application {
|
| - _stub = new PingPongServiceStub.fromEndpoint(endpoint)
|
| - ..delegate = this
|
| - ..listen();
|
| + _stub = new PingPongServiceStub.fromEndpoint(
|
| + endpoint, impl: this);
|
| }
|
|
|
| void setClient(ProxyBase proxyBase) {
|
| @@ -34,19 +33,19 @@ class PingPongServiceImpl implements PingPongService {
|
| _pingPongClient = null;
|
| }
|
| _stub.close();
|
| - if (_application != null) {
|
| - _application.close();
|
| - }
|
| }
|
| }
|
|
|
| class PingPongApplication extends Application {
|
| PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
|
|
|
| - void acceptConnection(String requestorUrl, ApplicationConnection connection) {
|
| + void acceptConnection(String requestorUrl,
|
| + ApplicationConnection connection,
|
| + String resolvedUrl) {
|
| connection.provideService(PingPongServiceName,
|
| (endpoint) => new PingPongServiceImpl(this, endpoint));
|
| - connection.listen();
|
| + // Close the application when the first connection goes down.
|
| + connection.listen(onClosed: close);
|
| }
|
| }
|
|
|
|
|