mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-12 02:51:22 +00:00
crash when there is an error during login
This commit is contained in:
parent
b89ab41231
commit
17b65f5021
1 changed files with 7 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ module.exports = inject;
|
|||
|
||||
function inject(serv,options)
|
||||
{
|
||||
serv._server.on('login', function (client) {
|
||||
serv._server.on('login', async function (client) {
|
||||
if(!options["online-mode"])
|
||||
client.uuid=UUID.v3({
|
||||
namespace: UUID.namespace.dns,
|
||||
|
|
@ -22,6 +22,11 @@ function inject(serv,options)
|
|||
playerPlugins[pluginName](serv, player, options);
|
||||
}
|
||||
serv.emit("newPlayer",player);
|
||||
player.login();
|
||||
try {
|
||||
await player.login();
|
||||
}
|
||||
catch(err){
|
||||
setTimeout(function(){throw err;},0)
|
||||
}
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue