whitespace
This commit is contained in:
parent
27aaab3161
commit
211f3af592
@ -36,8 +36,8 @@ function noQsMethod(options) {
|
|||||||
});
|
});
|
||||||
var callback_timeout;
|
var callback_timeout;
|
||||||
// If callback explicitely set to false, start timeout to disconnect socket
|
// If callback explicitely set to false, start timeout to disconnect socket
|
||||||
if (options.callback === false || typeof options.callback === "number") {
|
if (options.callback === false || typeof options.callback === 'number') {
|
||||||
if (typeof options.callback === "number") {
|
if (typeof options.callback === 'number') {
|
||||||
if (options.callback < 0) {
|
if (options.callback < 0) {
|
||||||
// If callback is negative(invalid value), make it positive
|
// If callback is negative(invalid value), make it positive
|
||||||
options.callback = Math.abs(options.callback);
|
options.callback = Math.abs(options.callback);
|
||||||
@ -48,7 +48,7 @@ function noQsMethod(options) {
|
|||||||
}, (options.callback === false ? 0 : options.callback));
|
}, (options.callback === false ? 0 : options.callback));
|
||||||
}
|
}
|
||||||
socket.emit('unauthorized', error, function() {
|
socket.emit('unauthorized', error, function() {
|
||||||
if (typeof options.callback === "number") {
|
if (typeof options.callback === 'number') {
|
||||||
clearTimeout(callback_timeout);
|
clearTimeout(callback_timeout);
|
||||||
}
|
}
|
||||||
socket.disconnect('unauthorized');
|
socket.disconnect('unauthorized');
|
||||||
@ -237,7 +237,7 @@ function getSecret(request, secret, token, callback) {
|
|||||||
} else {
|
} else {
|
||||||
callback(null, secret);
|
callback(null, secret);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
exports.authorize = authorize;
|
exports.authorize = authorize;
|
||||||
exports.UnauthorizedError = UnauthorizedError;
|
exports.UnauthorizedError = UnauthorizedError;
|
||||||
|
Reference in New Issue
Block a user