Having Issues Connecting To Master Due To 'Disconnect By Server Logic'
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Having Issues Connecting To Master Due To 'Disconnect By Server Logic'
Rob161
2021-08-04 15:32:52
Hi,
I'm trying to do a simple connect with PUN2 in Unity and I get disconnected due to 'Disconnect By Server Logic'. Before disconnecting, this is what shows in my console:
Server ns.exitgames.com:5058 sent disconnect. PeerId: 955 RTT/Variance:70/26 reason byte: 1 peerConnectionState: Connected
My script is simply this:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;
public class TestConnect : MonoBehaviourPunCallbacks
{
void Start()
{
//PhotonNetwork.GameVersion = "0.1.1";
PhotonNetwork.ConnectUsingSettings();
}
public override void OnConnectedToMaster()
{
print("Connecting to server");
}
public override void OnDisconnected(DisconnectCause cause)
{
print("Disconnected from server for reason " + cause.ToString());
}
}
Can anyone provide some assistance with this? I feel like I have done every check but still no success.
Thanks.
Comments
I guess there is more in your console log than this. The "Get Help" page should explain how to get more info. Also the "Analyzing Disconnects" topic may be of interest...
Try our PUN Basics Tutorial. It should get you online.
Thanks for the info/links. Looks like the issue arises from the authentication. As I am authenticating with Playfab, I take it my Custom Auth setup isn't quite right. I will try the standard Authentication setup and see how I go.
Back to top