void Connect()
{
var exe = GetType().Assembly.Location;
if (ncs == null)
Open();
try
{
ConnectClient();
return;
}
catch (IOException ex)
{
Logging.Emit("error connecting {0}", ex.Message);
try { ncs.Dispose(); Open(); }
catch { }
}
catch (TimeoutException)
{
Logging.Emit("could not connect to cclash service");
throw new CClashServerNotReadyException();
}
}