Navigation

    Colyseus
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. lavren1974
    3. Best
    • Profile
    • More
      • Continue chat with lavren1974
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups

    Best posts made by lavren1974

    RE: Room.onLeave() do not call on connection lost.

    May try to track through room.onStateChange, i.e.
    create on the server in a state, let's say the variable MyConnect: true when called

    room.onStateChange((state) => {
    				if (state.MyConnect != true) {
    				 // Do something ...
    				}
                });
    

    If the connection is terminated, then state.MyConnect will be undefined, which means it will not equal true

    posted in Questions & Help •