Issues with SessionList and GetProtocolToken()

Options
I am using Photon Bolt and having some issues when using BoltNetwork.SessionList and also GetProtocolToken().

I have a headless server instance which is starting and calling BoltLauncher.StartServer(). The server then registers PhotonRoomProperties as a token class in BoltStartBegin, and creates a new PhotonRoomProperties instance in BoltStartDone (with a couple properties added, one string one int). IsOpen and IsVisible are set to true. Finally, server calls BoltMatchmaking.CreateSession and passes in the scene to load, an ID, and the token I just created.

My issue, is that SessionList is unreliably updated when this server startup is complete. Sometimes, a client which is subsequently started using BoltLauncher.StartClient() will never see the session in the session list. Sometimes it will. It's random, but probably close to 50/50 chance. Repeatedly closing both client and server and starting again will sometimes lead to client seeing the session in SessionList.

In addition to this, whenever I DO find the created session in SessionList, calling GetProtocolToken on it will raise an IndexOutOfRangeException. Full stack trace below:
IndexOutOfRangeException: Index was outside the bounds of the array.
UdpKit.UdpPacket.InternalReadByte (System.Int32 bits) (at <c4ae73ae75084feaa73163672d7da255>:0)
UdpKit.UdpPacket.ReadUShort (System.Int32 bits) (at <c4ae73ae75084feaa73163672d7da255>:0)
UdpKit.UdpPacket.ReadUShort () (at <c4ae73ae75084feaa73163672d7da255>:0)
UdpKit.UdpPacket.ReadString (System.Text.Encoding encoding) (at <c4ae73ae75084feaa73163672d7da255>:0)
UdpKit.UdpPacket.ReadString () (at <c4ae73ae75084feaa73163672d7da255>:0)
Bolt.Tokens.BoltDisconnectToken.Read (UdpKit.UdpPacket packet) (at <91e633532a7e4582a260e897276e2d36>:0)
Bolt.ProtocolTokenUtils.ToToken (System.Byte[] bytes) (at <91e633532a7e4582a260e897276e2d36>:0)
Bolt.Utils.BoltUtils.GetProtocolToken (UdpKit.UdpSession session) (at <91e633532a7e4582a260e897276e2d36>:0)

Comments