Move PingTimer instantiation

This commit is contained in:
Drew DeVault 2015-05-09 20:11:38 -06:00
parent 6aa43295c5
commit da7c17b505

View File

@ -99,7 +99,6 @@ namespace ChatSharp
Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
ReadBuffer = new byte[ReadBufferLength];
ReadBufferIndex = 0;
Socket.BeginConnect(ServerHostname, ServerPort, ConnectComplete, null);
PingTimer = new Timer(30000);
PingTimer.Elapsed += (sender, e) =>
{
@ -117,6 +116,7 @@ namespace ChatSharp
}
};
checkQueue.Start();
Socket.BeginConnect(ServerHostname, ServerPort, ConnectComplete, null);
}
public void Quit()