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

Commit

Permalink
No-op proxy_manager if no config files are present.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbreen committed Feb 6, 2015
1 parent f4013dc commit ccffc0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/proxy_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ function loadConfigFiles(cb) {
// is responsible for stopping and starting all proxies that have changed state.
var wrapped_cb = _.after(files.length, create_proxy_config_finalizer(stop_me, start_me, cb));

// If there are no pending files, call wrapped_cb immediately.
if (files.length === 0) return wrapped_cb();

files.forEach(function(file) {
logger.info('Loading proxy configuration file %s', file);
fs.readFile(CONFIG_DIR + path.sep + file, {'encoding':'utf8'}, function(err, data) {
Expand Down

0 comments on commit ccffc0e

Please sign in to comment.