PUN1: OnDisconnectedFromPhoton after 40-60 secs after joining a room
Options
Hey there,
I use PUN1 and when I load the scene for the first time it's fine. When I load it for the second, third, etc times - I stably get OnDisconnectedFromPhoton after 40-60 secs after I load the scene. Is there anything I should clear? It works on the first load so I assume I don't reset something properly.
In order to connect I use:
PhotonNetwork.ConnectUsingSettings("v1.0");
->
OnConnectedToMaster
->
PhotonNetwork.JoinOrCreateRoom(matchId, roomOptions, null);
Please help!
-zelena
I use PUN1 and when I load the scene for the first time it's fine. When I load it for the second, third, etc times - I stably get OnDisconnectedFromPhoton after 40-60 secs after I load the scene. Is there anything I should clear? It works on the first load so I assume I don't reset something properly.
In order to connect I use:
PhotonNetwork.ConnectUsingSettings("v1.0");
->
OnConnectedToMaster
->
PhotonNetwork.JoinOrCreateRoom(matchId, roomOptions, null);
Please help!
-zelena
0
Comments
-
I wanted to note that I am not getting OnConnectionFail; all I get is OnDisconnectedFromPhoton0
-
Update: upgraded to Photon Unity Networking v1.94 - the bug still persists.0
-
Hi @zelena,
There is some weirdness in your report:when I load the scene for the first time it's fine. When I load it for the second, third, etc times - I stably get OnDisconnectedFromPhotonI don't see how the first time loading the scene can be different from the subsequent trials. What changes? At which point do you do this scene loading?I stably get OnDisconnectedFromPhoton after 40-60 secs after I load the sceneThe 40-60 seconds period is strange and could be not related to the scene loading at all, maybe something else like you're being disconnected because the client is sending too much in a short period of time.I am not getting OnConnectionFail; all I get is OnDisconnectedFromPhotonVery strange, are you sure you are not callingDisconnect()
manually in some script? What is the value ofPhotonNetwork.BackgroundTimeout
? How do you implementOnConnectionFail
?
Also, you did not answer all my previous questions.
Anyway, please answer these:
Does this happen on Unity Editor? What Unity version(s) did you reproduce this with?
Your target platform is iOS only or you tested this only on iOS devices? can you test this on Android as well?
Does this happen with the demo scenes provided in the package?
How do you load scenes? Do you usePhotonNetwork.LoadLevel
orPhotonNetwork.LoadLevelAsync
else?
Can you try and get help from "Analyzing Disconnects" page.
You can make use of the "SupportLogger" to get more info.0