Fixes #11 Segmentation fault.

This commit is contained in:
Miao Jiang 2013-02-20 02:58:50 +08:00
parent 01dbe4e0ce
commit 745124ebd6
4 changed files with 39 additions and 19 deletions

View file

@ -20,13 +20,14 @@ curl.on('data', function(chunk) {
curl.on('error', function(e) {
p("error: " + e.message)
curl.close();
once();
});
curl.on('end', function() {
p('done.');
p('code: ' + curl.getinfo('RESPONSE_CODE'));
curl.getinfo('RESPONSE_CODE');
curl.close();
p('done.');
});
curl.perform();