Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
  1. Home
  2. General
  3. Reconnect to room on a Relay Server

Reconnect to room on a Relay Server

Scheduled Pinned Locked Moved Unsolved General
30 Posts 3 Posters 20.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alessio Falsetti
    wrote on last edited by
    #7

    Hi Paul & Greg,

    1. player B re-authenticates, so I assume that his "cx" changes. Is it possible to ensure that the player can re-enter the room even by re-authenticating? If you have a unique passcode, could you use that?

    2. "Allow join in progress" is true

    Regarding the number of rooms, so in practice you can have a maximum of 2500 simultaneous rooms (50 "Max servers" x 50 "Containers per Server"), right?

    Thank you!

    1 Reply Last reply
    0
    • Paul WinterhalderP Offline
      Paul WinterhalderP Offline
      Paul Winterhalder
      brainCloudAdmin
      wrote on last edited by Paul Winterhalder
      #8

      Hi Alessio,

      I think we've identified your test app and lobby. We believe that both

      Disband at Start

      Allow join in progress

      are enabled for that lobby. Unfortunately - they shouldn't be - this is a regression in Portal-X - it should be disallowing that combo.

      So what we believe is happening is player B is re-authenticating before attempting to re-connect.

      Because Player B now has a new session, he/she also has a new connection id (i.e. cx) - and the Relay Server seems them as a new person.

      Because "Allow Join in Progress" is enabled - the Relay Server attempts to contact the lobby to see if this user is valid - but that lobby doesn't exist anymore - and we get the error you are seeing... (which is maybe not the best error message).

      Disabling "Allow join in progress" will result in a more understandable error message - but probably won't fix the problem.

      The real trick to this scenario would be for the network re-connect to the room server to happen without recreating the CX - but depending upon the type of network failure that is probably unavoidable.

      The devs are looking into options.

      Paul.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Alessio Falsetti
        wrote on last edited by
        #9

        Thanks Paul, I really appreciate it.
        Bear in mind that the player could also disconnect due to a crash or the mobile device being turned off, so the possibility of re-entering the room even after having performed a new authentication would be very very important.

        Please let me know!

        Alessio

        1 Reply Last reply
        0
        • Paul WinterhalderP Offline
          Paul WinterhalderP Offline
          Paul Winterhalder
          brainCloudAdmin
          wrote on last edited by
          #10

          Also Alessio,

          Agreed with your scenario - we are prioritizing a improvement to deal with that scenario for you.

          Also that maximum # of servers is a limit that we can control per-app - so we can bump that up.

          Paul.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Alessio Falsetti
            wrote on last edited by
            #11

            Hi @Paul-Winterhalder, any chance to have new developments regarding reconnection in the room?

            1 Reply Last reply
            0
            • Paul WinterhalderP Offline
              Paul WinterhalderP Offline
              Paul Winterhalder
              brainCloudAdmin
              wrote on last edited by
              #12

              Hi @Alessio-Falsetti - checking with the devs.

              I believe we have a short-term Relay Server patch that makes reconnecting generally more reliable -- but also a change for 5.2 that can allow reconnecting across sessions... (that will be an option for the dev to enable).

              5.2 is currently targeting mid-to-late February for release.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Alessio Falsetti
                wrote on last edited by
                #13

                Great! Happy to hear that!

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Alessio Falsetti
                  wrote on last edited by
                  #14

                  Ciao @Paul-Winterhalder, @Greg-Moulds,
                  I have updated BC to 5.2, so I can implement the rejoin in the room. But it's not clear to me how to implement it. The only information I found is in the release notes where it only says this:

                  Reconnects - Relay Servers now better handling reconnect scenarios. There is also an option to allow reconnects even if the user’s session has changed ("ALLOW_REJOIN_BY_PROFILE_ID": "true").

                  How does it work?

                  Thanks!

                  1 Reply Last reply
                  0
                  • Greg MouldsG Offline
                    Greg MouldsG Offline
                    Greg Moulds
                    brainCloudAdmin
                    wrote on last edited by
                    #15

                    Hey @Alessio-Falsetti . In order to enable that feature, you need to update the "Custom Environment" settings for the appropriate "My Servers" definition:

                    image.png

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      Alessio Falsetti
                      wrote on last edited by
                      #16

                      Hi @Greg-Moulds ,
                      ok, I've updated the custom environment of my server, and now? If I try to rejoin the room, I receive alway this error:
                      "status":403,"reason_code":90300,"status_message":"Server Closed Connection","severity":"ERROR"}.

                      I'm using:
                      RelayService.Connect(RelayConnectionType.TCP, connectionOptions, null, failureCallback);

                      What should I do?
                      Thanks!

                      1 Reply Last reply
                      0
                      • Greg MouldsG Offline
                        Greg MouldsG Offline
                        Greg Moulds
                        brainCloudAdmin
                        wrote on last edited by
                        #17

                        Hmm... 🤔 Let me poke around.

                        1 Reply Last reply
                        0
                        • Greg MouldsG Offline
                          Greg MouldsG Offline
                          Greg Moulds
                          brainCloudAdmin
                          wrote on last edited by
                          #18

                          So a question for you... are you able to connect initially and it's failing on the reconnect? Or are you failing to connect at all?

                          1 Reply Last reply
                          0
                          • Greg MouldsG Offline
                            Greg MouldsG Offline
                            Greg Moulds
                            brainCloudAdmin
                            wrote on last edited by
                            #19

                            I'm assuming from your statement "if I try to rejoin the room" that you've connected successfully initially.

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              Alessio Falsetti
                              wrote on last edited by
                              #20

                              Yes, works well first time.

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                Alessio Falsetti
                                wrote on last edited by
                                #21

                                However, reconnection doesn't work.

                                1 Reply Last reply
                                0
                                • Greg MouldsG Offline
                                  Greg MouldsG Offline
                                  Greg Moulds
                                  brainCloudAdmin
                                  wrote on last edited by
                                  #22

                                  Ok thanks @Alessio-Falsetti . We're still looking into it so I'll let you know when we have an update.

                                  1 Reply Last reply
                                  0
                                  • Greg MouldsG Offline
                                    Greg MouldsG Offline
                                    Greg Moulds
                                    brainCloudAdmin
                                    wrote on last edited by
                                    #23

                                    @Alessio-Falsetti Next question... what are your "Disband on start" and "Allow join in progress" settings for this lobby type?

                                    1 Reply Last reply
                                    0
                                    • Greg MouldsG Offline
                                      Greg MouldsG Offline
                                      Greg Moulds
                                      brainCloudAdmin
                                      wrote on last edited by Greg Moulds
                                      #24

                                      Ok @Alessio-Falsetti ,
                                      I'm 99% sure I know what's going wrong. Correct me if I'm wrong but your lobby type configuration has both "Disband on start" and "Allow join in progress" set to true.
                                      This was a bug in our portal that existed up until the recent 5.2 release. Now, you cannot set both those values to true. The portal (neither portal-X nor the legacy portal) will not allow you to do this.
                                      All that said, your lobby type configuration was obviously created before we fixed this so your lobby configuration is in a bad state and you need to choose one or the other.
                                      I don't know enough about your use-case to say which you should choose but if you want to ask for some guidance, let us know and we can take a closer look at your requirements and figure it out.
                                      For now, you can just do a quick test by turning one of "Disband on start" or "Allow join in progress" off and re-run your test.
                                      Let us know how it turns out!

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        Alessio Falsetti
                                        wrote on last edited by
                                        #25

                                        Ciao @Greg-Moulds,
                                        yes, you are right... I had both "Disband on start" and "Allow join in progress". I removed "Allow join in progress" and now the re-connection works normally. I'll do some more testing, but this seems to have solved the problem!
                                        I'll let you know if I discover anything else!

                                        Thanks a lot! 🙂

                                        1 Reply Last reply
                                        0
                                        • Greg MouldsG Offline
                                          Greg MouldsG Offline
                                          Greg Moulds
                                          brainCloudAdmin
                                          wrote on last edited by
                                          #26

                                          Great @Alessio-Falsetti Glad to hear it! 👍

                                          1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Solved
                                          • Unsolved
                                          • Users