"hash" varible moved inside joinServerRequest function

This commit is contained in:
Xabier de Zuazo 2013-04-07 12:04:29 +02:00
parent bcef115c07
commit ab0237e5e6

View file

@ -261,9 +261,6 @@ function createClient(options) {
return
}
var hash = crypto.createHash('sha1');
hash.update(packet.serverId);
if (haveCredentials) {
joinServerRequest(onJoinServerResponse);
} else {
@ -283,6 +280,8 @@ function createClient(options) {
}
function joinServerRequest(cb) {
var hash = crypto.createHash('sha1');
hash.update(packet.serverId);
hash.update(sharedSecret);
hash.update(packet.publicKey);