mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-05-10 05:10:27 -04:00
"hash" varible moved inside joinServerRequest function
This commit is contained in:
parent
bcef115c07
commit
ab0237e5e6
1 changed files with 2 additions and 3 deletions
5
index.js
5
index.js
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue