This code detects if the internet conneciton has been lost. However once it reconnects it seems to lose the ability to find a server. This is a vb.net windows program.
I tested it by starting the program, observing the connected icon appear. I then pulled the cable, waitied until the "Connected" icon appeared. I clicked Login, and it immediatley failed. If I dont pull the cable and just login normally everything executes fine.
Can anyone make a better suggestion of how to handle the internet check better? This operates in a seperate thread.
Public Sub ConnectionCheck()
Dim porttest As New TcpClient
Label19.Visible = True
Label20.Visible = False
Label19.Visible = False
Label20.Visible = True