mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 03:39:00 +00:00
Fixed frontend ws session onclose handling.
This commit is contained in:
parent
486c46f608
commit
4e0f7b52d4
@ -440,7 +440,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
216.05530045313827,
|
||||
344.75930058781137,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -253,8 +253,8 @@ cc.Class({
|
||||
if (null != window.handleBattleColliderInfo) {
|
||||
window.handleBattleColliderInfo = null;
|
||||
}
|
||||
if (null != window.handleClientSessionCloseOrError) {
|
||||
window.handleClientSessionCloseOrError = null;
|
||||
if (null != window.handleClientSessionError) {
|
||||
window.handleClientSessionError = null;
|
||||
}
|
||||
},
|
||||
|
||||
@ -349,8 +349,8 @@ cc.Class({
|
||||
window.forceBigEndianFloatingNumDecoding = self.forceBigEndianFloatingNumDecoding;
|
||||
|
||||
console.warn("+++++++ Map onLoad()");
|
||||
window.handleClientSessionCloseOrError = function() {
|
||||
console.warn('+++++++ Common handleClientSessionCloseOrError()');
|
||||
window.handleClientSessionError = function() {
|
||||
console.warn('+++++++ Common handleClientSessionError()');
|
||||
|
||||
if (ALL_BATTLE_STATES.IN_SETTLEMENT == self.battleState) {
|
||||
console.log("Battled ended by settlement");
|
||||
|
@ -224,6 +224,7 @@ window.initPersistentSessionClient = function(onopenCb, expectedRoomId) {
|
||||
case constants.RET_CODE.MYSQL_ERROR:
|
||||
case constants.RET_CODE.PLAYER_NOT_FOUND:
|
||||
case constants.RET_CODE.PLAYER_CHEATING:
|
||||
case 1006: // Peer(i.e. the backend) gone unexpectedly
|
||||
if (window.handleClientSessionError) {
|
||||
window.handleClientSessionError();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user