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;
|
readonly Task loopTask;
|
||||||
ushort packetIdx = 0;
|
ushort packetIdx = 0;
|
||||||
private ushort NextPacketIdx => packetIdx;
|
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)
|
public Connection(TcpClient tcpClient)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||||
</startup>
|
</startup>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RootNamespace>BLHX.Server.PcapParser</RootNamespace>
|
<RootNamespace>BLHX.Server.PcapParser</RootNamespace>
|
||||||
<AssemblyName>BLHX.Server.PcapParser</AssemblyName>
|
<AssemblyName>BLHX.Server.PcapParser</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<Deterministic>true</Deterministic>
|
<Deterministic>true</Deterministic>
|
||||||
|
|||||||
Reference in New Issue
Block a user