Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-06-04 14:36:08 +0400
committerRyan <ry@tinyclouds.org>2009-06-04 14:39:19 +0400
commitc457b829e29574e9aeb7a71a6197b08deb06d485 (patch)
treeb65fdcb361f1be89efe3f1ad8314aab034ef2aec /test_client.js
parent8cfdd326a858262545dbf335da9ce0507145d8e5 (diff)
If http.Client has an error, do not continue to reconnect.
Diffstat (limited to 'test_client.js')
-rw-r--r--test_client.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test_client.js b/test_client.js
index eec918da1c0..56e0137805f 100644
--- a/test_client.js
+++ b/test_client.js
@@ -1,5 +1,9 @@
var c = new node.http.Client(8000, "127.0.0.1");
+c.onError = function () {
+ puts("http client connection error.");
+};
+
var req = c.get("/bytes/123", [["Accept", "*/*"]]);
req.finish(function (res) {
puts("response 1: " + res.statusCode.toString());