Skip to content

Commit

Permalink
do not emit pause event when already paused
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Jul 22, 2012
1 parent 366f6cb commit 1e5a27e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -52,6 +52,7 @@ function through (write, end) {
stream.emit('close')
}
stream.pause = function () {
if(stream.paused) return
stream.paused = true
stream.emit('pause')
}
Expand Down

0 comments on commit 1e5a27e

Please sign in to comment.