Possible issue with initializeConnection in Photon AS3 SDK?

BesoCBesoC
edited August 2013 in Flash (deprecated)
Hi

Looks like photon flash library sometimes calls one operation several times. Examples:
[code2=plain]2013-08-09 04:19:47,110 [52] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 144, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:47 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:47,317 [42] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 145, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:47 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:47,564 [66] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 146, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:47 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:47,804 [61] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 147, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:47 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:48,019 [43] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 148, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:47 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:48,263 [86] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 149, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:48 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:48,494 [60] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 150, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:48 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:48,705 [52] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 151, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:48 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:48,930 [81] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 152, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:48 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:49,153 [82] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 153, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:49 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:49,479 [35] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 154, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:49 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:49,751 [61] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 155, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:49 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:50,307 [82] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 156, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:50 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:50,748 [71] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 157, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:50 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:51,122 [43] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 158, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:51 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:51,450 [43] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 159, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:51 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:51,858 [22] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 160, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:51 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:52,131 [52] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 161, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:52 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:52,371 [43] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 162, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:52 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer
2013-08-09 04:19:52,707 [40] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - Gambler JoinLobbyRequest Error: DuplicateAccount, UserName: kviciani94, AccountID: 7915, ClientType: Terminal, ClientVersion: 1.5.0.1, ConnectionID: 163, IP: 95.104.117.130, JoinDate: 8/9/2013 4:19:52 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.TerminalPeer[/code2]
[code2=plain]2013-08-09 10:10:24,599 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,599 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,599 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,600 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,601 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,601 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,601 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,602 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,602 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,603 [23] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,603 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,603 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,604 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,604 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,604 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,605 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,605 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,605 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,606 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,606 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
2013-08-09 10:10:24,606 [51] ERROR GBSSoft.BackGammon.Server.BackGammonPeer [(null)] - GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: shonzo84, AccountID: 55855, ClientType: Windows, ClientVersion: 1.5.0.1, ConnectionID: 712, IP: 178.134.151.181, JoinDate: 8/9/2013 10:10:24 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer[/code2]
Operation can be called 15-20 or more times a second. Operation can be called with different ConnectionIDs as well as inside one connection.

One thing worth to mention: this behaviour can be seen only for JoinLobby request. JoinLobby request is the only function that is called after initializing connection to server:
[code2=as3]package com.gbssoft.backgammon.connexion {

import exitgames.photon.PhotonCore;

internal class iCore extends PhotonCore {

public function iCore () {
super();
}

}
}[/code2]
[code2=as3]iCore.initializeConnection(serverName, port, policyPort);
iCore.addEventListener(InitializeConnectionResponse.TYPE, fromServerToLobby);

private function fromServerToLobby(event:Event):void {
if (event.type == InitializeConnectionResponse.TYPE)
{
operation( OpCodes.JOIN_LOBBY, [ *** params for join lobby ***] );
}
}[/code2]

Possible issue with initializeConnection in Photon AS3 SDK?

Comments

  • Hi

    new facts and suggestions- -please look at log:
    [code2=plain]NFO - 8/18/2013 8:16:10 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3543, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:10 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:15 AM: GamblerPeer disconnect started, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3543, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:10 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:15 AM: GamblerPeer Gambler Disconnected, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3543, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:10 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:15 AM: BackGammonPeer Disconnect. Reason: TimeoutDisconnect, ReasonDetail: , UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3543, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:10 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:16 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3544, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:16 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:21 AM: GamblerPeer disconnect started, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3544, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:16 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:21 AM: GamblerPeer Gambler Disconnected, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3544, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:16 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:21 AM: BackGammonPeer Disconnect. Reason: TimeoutDisconnect, ReasonDetail: , UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3544, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:16 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:22 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3545, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:22 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:27 AM: GamblerPeer disconnect started, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3545, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:22 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:27 AM: GamblerPeer Gambler Disconnected, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3545, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:22 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:27 AM: BackGammonPeer Disconnect. Reason: TimeoutDisconnect, ReasonDetail: , UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3545, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:22 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:28 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3546, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:28 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:33 AM: GamblerPeer disconnect started, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3546, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:28 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:33 AM: GamblerPeer Gambler Disconnected, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3546, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:28 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:33 AM: BackGammonPeer Disconnect. Reason: TimeoutDisconnect, ReasonDetail: , UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3546, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:28 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:34 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3547, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:34 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:39 AM: GamblerPeer disconnect started, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3547, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:34 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:39 AM: GamblerPeer Gambler Disconnected, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3547, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:34 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:39 AM: BackGammonPeer Disconnect. Reason: TimeoutDisconnect, ReasonDetail: , UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3547, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:34 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:40 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3548, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:40 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:45 AM: GamblerPeer disconnect started, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3548, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:40 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:45 AM: GamblerPeer Gambler Disconnected, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3548, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:40 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:45 AM: BackGammonPeer Disconnect. Reason: TimeoutDisconnect, ReasonDetail: , UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3548, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:40 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:46 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3549, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:46 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:51 AM: GamblerPeer disconnect started, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3549, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:46 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:51 AM: GamblerPeer Gambler Disconnected, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3549, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:46 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:51 AM: BackGammonPeer Disconnect. Reason: TimeoutDisconnect, ReasonDetail: , UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3549, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:46 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:52 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3550, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:52 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:57 AM: GamblerPeer disconnect started, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3550, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:52 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:57 AM: GamblerPeer Gambler Disconnected, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3550, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:52 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:57 AM: BackGammonPeer Disconnect. Reason: TimeoutDisconnect, ReasonDetail: , UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3550, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:52 AM, PeerState: Disconnecting, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:58 AM: Connected gambler, UserName: , AccountID: -1, ClientType: Windows, ClientVersion: 0.0.0.0, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: Connected, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    INFO - 8/18/2013 8:16:58 AM: Lobby AddGambler: Gambler lucky2012 added
    INFO - 8/18/2013 8:16:58 AM: Gambler joined lobby. Balance: 6085, Rank: 1412, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    ERROR!! - 8/18/2013 8:16:58 AM: GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    ERROR!! - 8/18/2013 8:16:58 AM: GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    ERROR!! - 8/18/2013 8:16:58 AM: GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    ERROR!! - 8/18/2013 8:16:58 AM: GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    ERROR!! - 8/18/2013 8:16:58 AM: GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    ERROR!! - 8/18/2013 8:16:58 AM: GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    ERROR!! - 8/18/2013 8:16:58 AM: GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer
    ERROR!! - 8/18/2013 8:16:58 AM: GamblerPeer OnOperationRequest: PeerState is JoinedToLobby, Operation: JoinLobby, UserName: lucky2012, AccountID: 26882, ClientType: Windows, ClientVersion: 1.5.0.4, ConnectionID: 3551, IP: 80.92.189.243, JoinDate: 8/18/2013 8:16:58 AM, PeerState: JoinedToLobby, Type: GBSSoft.BackGammon.Server.Peers.DownloadPeer[/code2]

    Peer is connected, but nothing happens - no JoinLobby operation request. Instead, peer seems to stop communicating with server and this results with TimeoutDisconnect. same situation repeats 8 times. After that, on 9th connect, peer finally calls JoinLobby and its state changes. Now, all of a sudden, peer calls JoinLobby again 8 times, in the same connection.

    It looks like the AS3 peer itself is misbehaving. Can you please check and update it ASAP?
  • In last log server handles 8 JoinLobby's - exactly the same count as failed connection attempts. It's not clear when these requests were sent. It wold be very strange if they were sent after last successful connections since socket should be reinitialized or recreated in this case. Btw, how reconnection is implemented?

    We definitely should check client side. The best way to do so is to check client tcp traffic. Are your server and client publicly available? If so then I can try analyze client traffic from my machine.
  • Here is the code:
    [code2=as3]package com.gbssoft.backgammon.connexion
    {
    import com.gbssoft.backgammon.common.op.*;
    import com.gbssoft.backgammon.connexion.events.*;
    import com.gbssoft.backgammon.manager.WindOpt;
    import exitgames.photon.response.InitializeConnectionResponse;
    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events.IOErrorEvent;
    import flash.events.SecurityErrorEvent;
    import flash.events.TimerEvent;
    import flash.utils.Timer;

    public class ServerConnector extends EventDispatcher
    {
    private var timer:Timer = new Timer(1000, 0);
    private var onlineStatus:Boolean = false;

    private var userName:String;
    private var userHash:String;
    private var connectionConfig:Object = {};

    private static const LOBBY_CONNECTION:String = "Lobby_Connection";
    private static const GAME_CONNECTION:String = "Game_Connection";
    private static const AIR_CONNECTION:String = "Air_Connection";
    private var CURRENT_CONNECTION:String = "";

    private var unicore:UniCore = new UniCore();


    public function get isConnected():Boolean {
    return unicore.isConnected;
    }
    public function removePing():void {
    unicore.removePing();
    }


    public function authenticate(_userName:String, _userHash:String, _lobInfo:Object):void {
    userName = _userName;
    userHash = _userHash;
    connectionConfig = _lobInfo;

    connectToServer();
    }


    private function connectToServer():void {
    unicore.addEventListener(InitializeConnectionResponse.TYPE, fromServerToLobbyAIR);

    unicore.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorHandler);
    unicore.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onIOErrorHandler);
    unicore.initializeConnection(connectionConfig.server, connectionConfig.port, connectionConfig.policyPort);
    }

    private function fromServerToLobbyAIR(event:Event):void {
    if (event.type == InitializeConnectionResponse.TYPE)
    {
    operation( OpCodes.JOIN_LOBBY, [ OpParams.USER_NAME, userName, OpParams.PASSWORD, userHash, OpParams.CLIENT_TYPE_ID, connectionConfig.type, OpParams.CLIENT_VERSION, connectionConfig.version] );
    helpForResponse();
    }
    }

    private function helpForResponse():void {
    unicore.addEventListener(ServerEvent.INFO, onServerEventInfo);
    unicore.addEventListener(ServerResponse.INFO, onServerResponseInfo);
    unicore.addEventListener(Event.CLOSE, disconnectedFromServer);

    onlineStatus = true;

    timer.stop();
    timer.reset();
    timer.addEventListener(TimerEvent.TIMER, onTimerEvent);
    timer.start();
    onTimerEvent(null);
    }

    private function disconnectedFromServer(e:Event):void {
    dispatchEvent(e);
    unicore.removeEventListener(InitializeConnectionResponse.TYPE, fromServerToLobby);
    unicore.removeEventListener(IOErrorEvent.IO_ERROR, onIOErrorHandler);
    unicore.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onIOErrorHandler);

    unicore.removeEventListener(ServerEvent.INFO, onServerEventInfo);
    unicore.removeEventListener(ServerResponse.INFO, onServerResponseInfo);
    unicore.removeEventListener(Event.CLOSE, disconnectedFromServer);
    timer.stop();
    timer.removeEventListener(TimerEvent.TIMER, onTimerEvent);
    }



    public function disconnect(connectAgain:Boolean = false):void {
    if (connectAgain) {
    unicore.disconnect();
    } else {
    timer.removeEventListener(TimerEvent.TIMER, onTimerEvent);
    timer.stop();
    unicore.disconnect();
    }
    }

    //****************************************************************************************************************//

    private function onTimerEvent(e:Event):void
    {
    var roundTripTime:Number = unicore.getRoundTripTime();
    var status:int = 0;
    var isConnected:Boolean = unicore.isConnected;

    if(isConnected) {
    if(0 <= roundTripTime && roundTripTime <= 500) {
    status = 5;
    } else if(500 < roundTripTime && roundTripTime <= 1000) {
    status = 4;
    } else if(1000 < roundTripTime && roundTripTime <= 1500) {
    status = 3;
    } else if(1500 < roundTripTime && roundTripTime <= 2000) {
    status = 2;
    } else if(2000 < roundTripTime && roundTripTime <= 2500) {
    status = 1;
    } else {
    status = 0;
    }
    } else {
    status = -1;
    }


    if(status >= 0 && isConnected)
    {
    dispatchEvent(new ServerEvent(ServerEvent.CONNECTION_STATUS, status));
    }
    else if (status == 0)
    {
    onlineStatus = false;
    disconnect(false);
    dispatchEvent(new ServerEvent(ServerEvent.CONNECTION_STATUS, 0));
    }
    else
    {
    if(onlineStatus)
    {
    dispatchEvent(new ServerEvent(ServerEvent.CONNECTION_STATUS, -1));
    onlineStatus = false;
    disconnect(true);
    }
    else
    {
    connectToServer();
    }
    }
    }




    public function operation(i:int, arr:Array = null):void {
    unicore.operation(i, arr);
    }

    private function onIOErrorHandler(e:Event):void {
    dispatchEvent(new ServerEvent(ServerEvent.IO_ERROR));
    }
    private function onServerEventInfo(e:ServerEvent):void
    {
    dispatchEvent(e);
    }
    private function onServerResponseInfo(e:ServerResponse):void
    {
    dispatchEvent(e);
    }
    }[/code2]

    one more strange thing is - connections were made with different ConnectionIDs, but all JoinLobbys came with the last ConnectionID
Sign In or Register to comment.