allow Request.request(callback)

This commit is contained in:
Ivan Tivonenko
2015-09-12 22:18:52 +03:00
parent 77068667e4
commit 5c9451d3ed
2 changed files with 6 additions and 4 deletions

View File

@@ -672,7 +672,6 @@ Server.prototype._handleResponse = function(message) {
const responseEvent = 'response_' + command;
request.emit('success', result);
request.emit('response', result);
[this, this._remote].forEach(function(emitter) {
emitter.emit(responseEvent, result, request, message);
@@ -687,8 +686,8 @@ Server.prototype._handleResponse = function(message) {
error_message: 'Remote reported an error.',
remote: message
});
request.emit('response');
}
request.emit('response', message);
};
Server.prototype._handlePathFind = function(message) {