From a676d8727d84072226bce7417bd5b26107a837d8 Mon Sep 17 00:00:00 2001
From: "rnystrom@google.com" <rnystrom@google.com>
Date: Mon, 12 Aug 2013 21:50:07 +0000
Subject: [PATCH] Add missing return.

BUG=
R=nweiz@google.com

Review URL: https://codereview.chromium.org//22952002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@26038 260f80e4-7a28-3924-810f-c04153c831b5
---
 lib/src/utils.dart | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index da8f640e..372f7def 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -191,7 +191,10 @@ Future<Stream> validateStream(Stream stream) {
     controller.add(value);
   }, onError: (error) {
     // If the error came after values, it's OK.
-    if (completer.isCompleted) controller.addError(error);
+    if (completer.isCompleted) {
+      controller.addError(error);
+      return;
+    }
 
     // Otherwise, the error came first and the stream is invalid.
     completer.completeError(error);
-- 
GitLab