mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-05-04 02:14:07 -04:00
Fixes #20 for real this time...
This commit is contained in:
parent
e8e78e2942
commit
b5516a81b3
1 changed files with 5 additions and 0 deletions
|
@ -24,6 +24,11 @@ Server.prototype.listen = function(port, host) {
|
|||
self.socketServer = net.createServer();
|
||||
self.socketServer.on('connection', function(socket) {
|
||||
var client = new Client(true);
|
||||
client._end = client.end;
|
||||
client.end = function end(endReason) {
|
||||
client.write(0xff, {reason: endReason});
|
||||
client._end(endReason);
|
||||
}
|
||||
client.id = nextId++;
|
||||
self.clients[client.id] = client;
|
||||
client.on('error', function(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue