mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-06 19:50:40 +00:00
don't login if the client is already ended, fix #113
This commit is contained in:
parent
c3bef15214
commit
567b82c61c
1 changed files with 1 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ module.exports.server=function(serv,options)
|
||||||
client.on('error',error => serv.emit('clientError',client,error)));
|
client.on('error',error => serv.emit('clientError',client,error)));
|
||||||
|
|
||||||
serv._server.on('login', async (client) => {
|
serv._server.on('login', async (client) => {
|
||||||
|
if(client.socket.listenerCount('end')==0) return; // TODO: should be fixed properly in nmp instead
|
||||||
try {
|
try {
|
||||||
var player = serv.initEntity('player', null, serv.overworld, new Vec3(0,0,0));
|
var player = serv.initEntity('player', null, serv.overworld, new Vec3(0,0,0));
|
||||||
player._client=client;
|
player._client=client;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue