Skip to content

Commit

Permalink
Don't call pauseNoRef whenn operating on a file which uses pure lua
Browse files Browse the repository at this point in the history
implementation of a stream.
  • Loading branch information
Kami committed Jul 13, 2012
1 parent 0a3b668 commit 34c04af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/luvit/uv.lua
Expand Up @@ -318,7 +318,11 @@ uv.createReadableStdioStream = function(fd)

-- unref the event loop so that we don't block unless the user
-- wants stdin. This follows node's logic.
stdin:pauseNoRef()
if fd_type ~= "FILE" then
-- fs.createReadStream returns iStream which is pure lua and doesn't have
-- pauseNoRef method
stdin:pauseNoRef()
end

return stdin
end
Expand Down

0 comments on commit 34c04af

Please sign in to comment.