mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-29 14:13:45 -04:00
Properly handle multiple set_compression requests during PLAY state
This commit is contained in:
parent
6d61de807e
commit
aad5ba0fd9
@ -13,6 +13,8 @@ var assert = require('assert')
|
||||
, states = protocol.states
|
||||
, debug = require("./debug")
|
||||
;
|
||||
|
||||
require("source-map-support").install();
|
||||
var ursa;
|
||||
try {
|
||||
ursa = require("ursa");
|
||||
@ -265,7 +267,7 @@ function createClient(options) {
|
||||
client.once([states.LOGIN, 0x01], onEncryptionKeyRequest);
|
||||
client.once([states.LOGIN, 0x02], onLogin);
|
||||
client.once("compress", onCompressionRequest);
|
||||
client.once("set_compression", onCompressionRequest);
|
||||
client.on("set_compression", onCompressionRequest);
|
||||
if(haveCredentials) {
|
||||
// make a request to get the case-correct username before connecting.
|
||||
var cb = function(err, session) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user