Fix #5970 and forking while debugging (#5965)

* Fix forking while debugging

Debugger address in use no longer happens

* Fix cropper error
This commit is contained in:
Peter Jaszkowiak
2017-10-09 09:40:36 -06:00
committed by Barış Soner Uşaklı
parent bb6dcf3779
commit 1c35213934
7 changed files with 71 additions and 34 deletions

View File

@@ -1,9 +1,8 @@
'use strict';
var fork = require('child_process').fork;
var path = require('path');
var debugParams = require('./meta/debugParams');
var fork = require('./meta/debugFork');
exports.hash = function (rounds, password, callback) {
forkChild({ type: 'hash', rounds: rounds, password: password }, callback);
@@ -17,7 +16,7 @@ exports.compare = function (password, hash, callback) {
};
function forkChild(message, callback) {
var child = fork(path.join(__dirname, 'bcrypt'), [], debugParams());
var child = fork(path.join(__dirname, 'bcrypt'));
child.on('message', function (msg) {
if (msg.err) {