backgroundtimeout not working in photon2.5

i have using photonnetwork.backgroundtimeout=10 sec it worked it photon2.2 but in photon2.5 it taking 20 sec even i had changed to 10 sec

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @chandru,

    How do you test this?
  • @JohnTube mod
    it was working fine on 2.2 but when i upgraded to 2.5 version the background timeout is not working
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited February 2019
    hi @chandru,

    I meant how do you actually test the background timeout?
    Do you use Unity Editor and disable "RunInBackground"?
    What Unity version do you use?
    Do you use an Android build?
    What device do you use?
    Do you check disconnection in logs?
    How do you measure this?

    Can you update to 2.6 and test also?
  • @JohnTube mod
    * I put my app to background after connected to photon and waited for 10 sec and the disconnection is not happened,I have set background timeout to 10 sec and onapplicationpaused(true) is also called but disconnection not happened in 10 sec it takes longer time.
    * disconnection is happeneing but it not happeneing on my specified time 10 sec its disconnecting on its default time 30 sec.
    * yes i use android build.
    * i have checkd in samsung tab a,honor 7x and much more devices.
    * i have replaced with version 2.2 and the disconnection is happening fine in 10 sec.
    * i have seen in change log of version 2.3 that background thread will extend for 30 seconds even the main loop is paused,in connectionhandeler scripts keepinalivebackground - 30000 ms and changed to 2000 ms and diconnection is happening in 10 sec.
  • @JohnTube mod
    *in version 2.6 also facing same issue and soved by changing the keepinalivebackground
    *does any other best method is available?
  • There are no references to BackgroundTimeout any more.
    I assume that it has been renamed keepinalivebackground and PhotonHandler has not been updated accordingly.
  • @DavidSWu
    in keepinalivebackground for 10 sec background time i need to keep the value as 2000ms
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @chandru,

    We have a task on our backlog to address this and someone from our team will look into it.
    Hopefully, a change will be made in the next PUN2 update.
  • JohnTube
    JohnTube ✭✭✭✭✭
    PUN2.7 is out (Feb 13, 2019):

    Renamed: PhotonNetwork.BackgroundTimeout is now PhotonNetwork.KeepAliveInBackground.
    Fixed: PhotonNetwork.KeepAliveInBackground now sets the ConnectionHandler.KeepAliveInBackground, which actually affects the background keep-alive.