Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created May 4, 2012 16:14
Show Gist options
  • Save springmeyer/2595836 to your computer and use it in GitHub Desktop.
Save springmeyer/2595836 to your computer and use it in GitHub Desktop.
diff --git a/lib/copytask.js b/lib/copytask.js
index 1873f2b..471f373 100644
--- a/lib/copytask.js
+++ b/lib/copytask.js
@@ -61,7 +61,8 @@ CopyTask.prototype.toJSON = function() {
CopyTask.prototype.finished = function() {
var task = this;
- this.pause(function() {
+ this.pause(function(err) {
+ if (err) throw err;
task.emit('finished');
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment