Skip to content

Instantly share code, notes, and snippets.

@mlin

mlin/hang.js Secret

Created February 6, 2013 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlin/23ce4a08890a81243988 to your computer and use it in GitHub Desktop.
Save mlin/23ce4a08890a81243988 to your computer and use it in GitHub Desktop.
aws-sdk v0.9.2-pre.3 for node.js hangs in S3 listBuckets
// aws-sdk v0.9.2-pre.3 for node.js hangs in S3 listBuckets
//
// Save this to hang.js, define AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
// environment variables, and:
//
// mkdir node_modules
// npm install aws-sdk@v0.9.1-pre.2
// node hang.js # old version: OK
// npm install aws-sdk@v0.9.2-pre.3
// node hang.js # HANGS
//
// Observed on node v0.6.21, Linux coderuler 3.5.0-23-generic #35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
//
// *** listObjects is also affected! ***
var AWS = require('aws-sdk');
var S3 = new AWS.S3();
S3.client.listBuckets(function(err, ans) {
if (err) throw err;
console.dir(ans);
process.exit(0);
});
// Keep process alive.
setInterval(function() {}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment