nodejitsu/node-cloudfiles — pull request #48 by STRML (2012-10-10 01:58:48+00:00)
Title: Add reconnect support as cloudfiles invalidates tokens every 24 hours.

I have been running node-cloudfiles in production for a while to run an image uploader and have noticed that every once in a while the uploader stops working.

As it turns out, Cloudfiles invalidates your accessToken every 24 hours.

This pull request contains the necessary code to detect a 401, attempt a reAuth, and restart the previous failed request.