Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
fix: Prevented EMFILE error (too many open files)
Browse files Browse the repository at this point in the history
  • Loading branch information
up73k committed Feb 15, 2017
1 parent 1f905cc commit e8e4dca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/gemini.js
Expand Up @@ -7,6 +7,7 @@ const PassthroughEmitter = require('./passthrough-emitter');
const Promise = require('bluebird');
const q = require('bluebird-q');
const pluginsLoader = require('plugins-loader');
const gracefulFs = require('graceful-fs');

const Config = require('./config');
const GeminiError = require('./errors/gemini-error');
Expand All @@ -25,6 +26,9 @@ const PREFIX = require('../package').name + '-';
require('http').globalAgent.maxSockets = Infinity;
Promise.promisifyAll(require('fs-extra'));

// patch fs module prototype for preventing EMFILE error (too many open files)
gracefulFs.gracefulify(require('fs'));

const parseBrowsers = (browsers) => {
return browsers && browsers.replace(/\s/g, '').split(',');
};
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -23,6 +23,7 @@
"gemini-configparser": "^0.1.1",
"gemini-core": "^1.0.0",
"gemini-coverage": "^1.0.0",
"graceful-fs": "^4.1.11",
"handlebars": "^4.0.5",
"inherit": "~2.2.1",
"js-yaml": "^3.2.5",
Expand Down

0 comments on commit e8e4dca

Please sign in to comment.