anchor.diff:      Expect.isTrue(server.port > 0);
   
       void checkDone() {
  -      if (doneCount == socketCount &&
  -          closeCount + errorCount == socketCount) {
  +      if (doneCount + earlyErrorCount == socketCount &&
  +          closeCount + errorCount + earlyErrorCount == socketCount) {
           port.close();
         }
       }
  
positive.code:   var doneCount = 0;
    var closeCount = 0;
    var errorCount = 0;
  
    ReceivePort port = new ReceivePort();
  
  
negative.code:         });
        }).catchError((e) {
          // "Connection actively refused by host" errors are handled here.
          earlyErrorCount++;
          checkDone();
        });
      }
  