anchor.diff:          timeoutSubscription.resume();
           timeoutController.addError(e, st);
         }, onDone: () {
  +        isSocketDone = true;
           timeoutSubscription.resume();
           timeoutController.close();
         });
  
positive.code:     StreamSubscription timeoutSubscription;
      StreamSubscription socketSubscription;
      StreamSubscription outputSubscription;
  
      timeoutController =
          StreamController(onCancel: () => socketSubscription.cancel());
  
negative.code:         StreamController(onCancel: () => timeoutSubscription.cancel());
  
      void pauseTimer() {
        if ((!timeoutSubscription.isPaused) && (!isSocketDone)) {
          timeoutSubscription.pause();
        }
      }
  
      void onListen() {
        timeoutSubscription = timeoutController.stream.timeout(timeoutMillis,
            onTimeout: (eventSink) {
          if (!isSocketDone) {
            eventSink
                .addError(TimeoutException("No stream event", timeoutMillis));
          }
        }).listen((event) => outputController.add(event),
            onError: (e, st) => outputController.addError(e, st),
            onDone: outputController.close);
  
        // There should be no timeout until data comes in
        timeoutSubscription.pause();
  