mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-29 08:45:02 +02:00
Direct IP connection fix
This commit is contained in:
parent
fae7349356
commit
f23ed8caa6
@ -53,12 +53,15 @@ Namespace Servers
|
|||||||
Try
|
Try
|
||||||
Dim connectIP As IPAddress = Nothing
|
Dim connectIP As IPAddress = Nothing
|
||||||
|
|
||||||
For Each IPAddress In System.Net.Dns.GetHostEntry(Server.IP).AddressList
|
If Not IPAddress.TryParse(Server.IP, connectIP) Then
|
||||||
If IPAddress.AddressFamily = AddressFamily.InterNetwork Then
|
For Each IPAddress In Dns.GetHostEntry(Server.IP).AddressList
|
||||||
connectIP = IPAddress
|
If IPAddress.AddressFamily = AddressFamily.InterNetwork Then
|
||||||
Exit For
|
connectIP = IPAddress
|
||||||
End If
|
Exit For
|
||||||
Next
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Me._client.Connect(connectIP.ToString, CInt(Server.Port))
|
Me._client.Connect(connectIP.ToString, CInt(Server.Port))
|
||||||
|
|
||||||
|
@ -466,12 +466,14 @@ Public Class JoinServerScreen
|
|||||||
|
|
||||||
Dim connectIP As IPAddress = Nothing
|
Dim connectIP As IPAddress = Nothing
|
||||||
|
|
||||||
For Each ipaddress In System.Net.Dns.GetHostEntry(Me.IP).AddressList
|
If Not IPAddress.TryParse(IP, connectIP) Then
|
||||||
If ipaddress.AddressFamily = AddressFamily.InterNetwork Then
|
For Each ipaddress In Dns.GetHostEntry(IP).AddressList
|
||||||
connectIP = ipaddress
|
If ipaddress.AddressFamily = AddressFamily.InterNetwork Then
|
||||||
Exit For
|
connectIP = ipaddress
|
||||||
End If
|
Exit For
|
||||||
Next
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
sw.Start()
|
sw.Start()
|
||||||
client.Connect(connectIP, CInt(Me.Port))
|
client.Connect(connectIP, CInt(Me.Port))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user