Make sure players are connected before grabbing the IP
This commit is contained in:
parent
cd0c8fab86
commit
886389e9d7
1 changed files with 1 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ namespace TShockAPI
|
|||
{
|
||||
get
|
||||
{
|
||||
return RealPlayer ? TShock.Utils.GetRealIP(Netplay.serverSock[Index].tcpClient.Client.RemoteEndPoint.ToString()) : "";
|
||||
return RealPlayer ? (Netplay.serverSock[Index].tcpClient.Connected ? TShock.Utils.GetRealIP(Netplay.serverSock[Index].tcpClient.Client.RemoteEndPoint.ToString()) : "") : "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue