Upgrading Photon Server from v3 to v4 (reconnecting)

This discussion was created from comments split from: Upgrading Photon Server from v3 to v4.

Comments

  • In the past few days I was able to upgrade most of the function from v3 to v4 without big issue. But today I got one problem with one of new feature of Photon v4: Reconnecting. It's probably not a big problem if I haven't have my own reconnect logic in v3. Because of v4 my reconnect code is simply not working. So now I think have two ways to deal with this (unless there is a better way of course).
    First is to disable Photon disconnect logic and let it work like v3 which in turn trigger my reconnecting code. Is there any way to disable it?
    Second is to understand Photon reconnect logic and add additional code to make it work like my old reconnecting logic, however I don't see a single document writing about this. If there is no document where should I peek in the code to understand Photon reconnecting logic?
  • where did you find/see this 'Reconnect logic'? Photon itself does not have anything like this. if you are speaking about LoadBalancing sample, everythnig is very simple. you may find implementation in MasterServerConnectionBase.cs. we initiate reconnect if connection failed, or if peer was disconnected. last you may find in OutgoingMasterPeer.cs. look into OnDisconnect
  • I thought it was complicate than the code in MasterServerConnectionBase. All I did was commented out the code in ReconnectToMaster() and my old code is working again. I felt embarrassed for asking this question. Thank you for your answer @chvetsov , you're really great.