mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-08-30 07:25:05 +00:00
Fix binding to ephemeral ports
This commit is contained in:
parent
89e1f50a34
commit
ab3c84f099
2 changed files with 10 additions and 2 deletions
|
|
@ -256,6 +256,11 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
|||
{
|
||||
_proxy.ReturnEphemeralPort(ProtocolType, (ushort)((IPEndPoint)LocalEndPoint).Port);
|
||||
}
|
||||
var asIPEndpoint = (IPEndPoint)localEP;
|
||||
if (asIPEndpoint.Port == 0)
|
||||
{
|
||||
asIPEndpoint.Port = (ushort)_proxy.GetEphemeralPort(ProtocolType);
|
||||
}
|
||||
|
||||
LocalEndPoint = (IPEndPoint)localEP;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,9 +50,12 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
_parent.NetworkClient.DisconnectNetwork();
|
||||
if (_parent.NetworkClient != null)
|
||||
{
|
||||
_parent.NetworkClient.DisconnectNetwork();
|
||||
|
||||
_parent.NetworkClient.NetworkChange -= NetworkChanged;
|
||||
_parent.NetworkClient.NetworkChange -= NetworkChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private ResultCode NetworkErrorToResult(NetworkError error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue