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