Reset socket exception before other operations for safety

Co-authored-by: Kvarkas <3611964+Kvarkas@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-03 21:25:15 +00:00
parent 04e0144004
commit 5cebc4d418

View File

@@ -165,10 +165,10 @@ namespace mRemoteNG.Connection.Protocol.VNC
{
lock (_testConnectLock)
{
_socketexception = null;
TcpClient tcpclient = new();
TimeoutObject.Reset();
_socketexception = null;
tcpclient.BeginConnect(hostName, port, CallBackMethod, tcpclient);
if (TimeoutObject.WaitOne(timeoutMSec, false))