Skip to content

Commit

Permalink
emit event when deflate stream returns false on write
Browse files Browse the repository at this point in the history
  • Loading branch information
ashelley committed Apr 28, 2015
1 parent 86c94d2 commit 82bdfb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/reference.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class PDFReference

if @compress
@initDeflate() if not @deflate
@deflate.write chunk
unless @deflate.write chunk
@document.emit('streamNeedsDrain', @deflate);
else
@chunks.push chunk
@data.Length += chunk.length
Expand Down

0 comments on commit 82bdfb6

Please sign in to comment.