OnDisconnectedFromPhoton not called
Options
Hi, I am having a strange issue where OnDisconnectedFromPhoton is not called. I just disable the WIFI. After around 1 min it throws socket exception but nothing is called. Sorry it is not throwed but printed
0
Comments
-
Edit:OnConnectionFail is called after timeout but OnDisconnectedFromPhoton is not called. In documentation it says that after OnConnectionFail also OnDisconnectedFromPhoton is called. Is this a bug?
0 -
I am using the latest version from assets store. I have tried on mac with Unity5.5. OnDisconnectedFromPhoton is not called at all. Region is EU0
-
Could you post code snippet or share small repro project?
With steps to reproduce of course.After around 1 min it throws socket exceptionAre you sure it's one minute?it throws socket exceptionCould you post the SocketException message?0 -
O sorry for that "After around 1 min it throws socket exception". That was in first post before I updated to latest version. In latest version OnConnectionFail is called correctly but OndisconnectedFromPhoton is not called. As regarding the code is like one in photon guides. Inheriting from PunBehaviour and overriding methods0
-
On Windows, from Unity Editor version 5.0.4f1, using default TCP settings, after I disable WiFi, I getReceiving failed. SocketException: TimedOut
after timeout which is 10 seconds and both expected callbacks are called;OnConnectionFail
andOnDisconnectedFromPhoton
.
what is the "Socket Exception message" you get? "TimedOut" or "ConnectionAborted" (like here)?I have tried on mac with Unity5.5Editor or build?0 -
I just tested today and it worked. Both callback are called. This is strange because nothing has changed.
Thank you very much for your support. I really appreciate it.0 -
Sorry for waking up this thread. Same thing is happening, there is a delay in editor before OnPhotonDisconnected is called. Latest version of photon is used0
-
Definitely this callback doesn't fire immediately. This is critical for my scenario. So I cannot wait for timeout. I will search for other methods.0
-
public override void OnDisconnected(DisconnectCause cause)
{
base.OnDisconnected(cause);
** do whatever you need here **
}0