Don't emit error twice from http.Client
authorRyan Dahl <ry@tinyclouds.org>
Mon, 3 May 2010 17:53:52 +0000 (10:53 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Mon, 3 May 2010 17:53:52 +0000 (10:53 -0700)
lib/http.js

index 6b9b1ef..fd00910 100644 (file)
@@ -679,10 +679,7 @@ function Client ( ) {
   };
 
   self.addListener("close", function (e) {
-    if (e) {
-      self.emit("error", e);
-      return;
-    }
+    if (e) return;
 
     debug("HTTP CLIENT onClose. readyState = " + self.readyState);