| Index: tests/standalone/src/SocketCloseTest.dart
|
| diff --git a/tests/standalone/src/SocketCloseTest.dart b/tests/standalone/src/SocketCloseTest.dart
|
| index e8c4a7c3c8a746d6107a90dabaecc504f5ab705e..ea7daf3646136c88f8d8e217a3df20038ca6b9a7 100644
|
| --- a/tests/standalone/src/SocketCloseTest.dart
|
| +++ b/tests/standalone/src/SocketCloseTest.dart
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
| //
|
| @@ -261,14 +261,12 @@ class SocketCloseServer extends Isolate {
|
| }
|
|
|
| waitForResult(Timer timer) {
|
| - // Make sure all iterations have been run. For mode 0 and 1 the
|
| - // client just closes the socket and after the last iteration
|
| - // signals the server. The server might now be finished just
|
| - // because iterations have reached the limit as this number is
|
| - // incremented just after accept. In that case wait for the last
|
| - // close event.
|
| - if (_iterations == ITERATIONS &&
|
| - (_mode > 1 || _closeEvents == ITERATIONS)) {
|
| + // Make sure all iterations have been run. In multiple of these
|
| + // scenarios it is possible to get the SERVERSHUTDOWN message
|
| + // before we have received the last close event on the
|
| + // server. We therefore always wait for the correct number of
|
| + // close events.
|
| + if (_iterations == ITERATIONS && _closeEvents == ITERATIONS) {
|
| switch (_mode) {
|
| case 0:
|
| Expect.equals(0, _dataEvents);
|
|
|