diff options
author | Ryan <ry@tinyclouds.org> | 2009-06-04 14:36:08 +0400 |
---|---|---|
committer | Ryan <ry@tinyclouds.org> | 2009-06-04 14:39:19 +0400 |
commit | c457b829e29574e9aeb7a71a6197b08deb06d485 (patch) | |
tree | b65fdcb361f1be89efe3f1ad8314aab034ef2aec /test_client.js | |
parent | 8cfdd326a858262545dbf335da9ce0507145d8e5 (diff) |
If http.Client has an error, do not continue to reconnect.
Diffstat (limited to 'test_client.js')
-rw-r--r-- | test_client.js | 4 |
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()); |