mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-29 14:13:45 -04:00
put keepAlive: false in proxy.js : fix connecting to a proxy with some lag (ie not with both proxy and vanilla client in localhost)
This commit is contained in:
parent
1f681ed810
commit
0ce00f2cc7
@ -77,7 +77,8 @@ if(host.indexOf(':') != -1) {
|
|||||||
|
|
||||||
var srv = mc.createServer({
|
var srv = mc.createServer({
|
||||||
'online-mode': false,
|
'online-mode': false,
|
||||||
port: 25566
|
port: 25566,
|
||||||
|
keepAlive: false
|
||||||
});
|
});
|
||||||
srv.on('login', function(client) {
|
srv.on('login', function(client) {
|
||||||
var addr = client.socket.remoteAddress;
|
var addr = client.socket.remoteAddress;
|
||||||
@ -101,7 +102,8 @@ srv.on('login', function(client) {
|
|||||||
port: port,
|
port: port,
|
||||||
username: user,
|
username: user,
|
||||||
password: passwd,
|
password: passwd,
|
||||||
'online-mode': passwd != null ? true : false
|
'online-mode': passwd != null ? true : false,
|
||||||
|
keepAlive:false
|
||||||
});
|
});
|
||||||
var brokenPackets = [/*0x04, 0x2f, 0x30*/];
|
var brokenPackets = [/*0x04, 0x2f, 0x30*/];
|
||||||
client.on('packet', function(packet) {
|
client.on('packet', function(packet) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user