暂时移除掉线重连的逻辑
This commit is contained in:
parent
ce4d142b2d
commit
8669961942
@ -88,18 +88,18 @@ export class GeneralRoom extends Room {
|
||||
}
|
||||
//TODO: 掉线逻辑
|
||||
async onLeave (client: Client, consented: boolean) {
|
||||
this.state.players.get(client.sessionId).state = PlayerStateConst.PLAYER_OFFLINE;
|
||||
|
||||
try {
|
||||
if (consented) {
|
||||
throw new Error("consented leave");
|
||||
}
|
||||
await this.allowReconnection(client, 60);
|
||||
this.state.players.get(client.sessionId).state = PlayerStateConst.PLAYER_NORMAL;
|
||||
|
||||
} catch (e) {
|
||||
this.state.players.delete(client.sessionId);
|
||||
}
|
||||
// this.state.players.get(client.sessionId).state = PlayerStateConst.PLAYER_OFFLINE;
|
||||
//
|
||||
// try {
|
||||
// if (consented) {
|
||||
// throw new Error("consented leave");
|
||||
// }
|
||||
// await this.allowReconnection(client, 60);
|
||||
// this.state.players.get(client.sessionId).state = PlayerStateConst.PLAYER_NORMAL;
|
||||
//
|
||||
// } catch (e) {
|
||||
// this.state.players.delete(client.sessionId);
|
||||
// }
|
||||
}
|
||||
|
||||
onDispose() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user