mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-12 14:34:39 +01:00
fix EndPoint null pointer
This commit is contained in:
@@ -22,7 +22,8 @@ namespace BLHX.Server.Game
|
||||
readonly Task loopTask;
|
||||
ushort packetIdx = 0;
|
||||
private ushort NextPacketIdx => packetIdx;
|
||||
public IPEndPoint EndPoint => (IPEndPoint?)tcpClient.Client.RemoteEndPoint ?? IPEndPoint.Parse("0.0.0.0:0");
|
||||
public IPEndPoint EndPoint => tcpClient?.Client?.RemoteEndPoint as IPEndPoint ?? IPEndPoint.Parse("0.0.0.0:0");
|
||||
|
||||
|
||||
public Connection(TcpClient tcpClient)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user