Fix binding to ephemeral ports
This commit is contained in:
parent
89e1f50a34
commit
ab3c84f099
@ -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…
x
Reference in New Issue
Block a user